Another approach is just to use callback function.

Once popup loads, send a function reference to background page.
Then use that function from background page to detect/get the popup page
window reference.
Use the popup reference for subsequent calls.
I used in one of my extension, which is working fine for me. :)

All the best.

~ Thangaraju Ramasamy


On Fri, Dec 11, 2009 at 08:29, Adam Barth <aba...@chromium.org> wrote:

> Yes, the background page can get a list of all the active views.  I
> think you're looking for this API:
>
> http://code.google.com/chrome/extensions/extension.html#method-getViews
>
> Adam
>
>
> On Thu, Dec 10, 2009 at 10:58 AM, tazz_ben <b...@wbpsystems.com> wrote:
> > So, I've split my code into two parts.  The background process syncs
> > data with the web service on a timer.  The popup shows data directly
> > out of the local storage.  There is a bit of an edge case where the
> > popup happens to be open and the sync service just finished.  I don't
> > want to ALWAYS repopulate the popup DOM with the updated information;
> > just when it is open.   Is it possible to detect if the popup is open
> > from the background service.
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> "Chromium-extensions" group.
> > To post to this group, send email to
> chromium-extensi...@googlegroups.com.
> > To unsubscribe from this group, send email to
> chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/chromium-extensions?hl=en.
> >
> >
> >
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Chromium-extensions" group.
> To post to this group, send email to chromium-extensi...@googlegroups.com.
> To unsubscribe from this group, send email to
> chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/chromium-extensions?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@googlegroups.com.
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to