Thanks, that makes sense now. Is there any way to detect the page
action popup is being closed?
My page action resembles the "star" bookmark button and needs to issue
an AJAX call to commit any changes made.


On Nov 13, 12:50 am, Jeff Timanus <[email protected]> wrote:
> Ah, I see the problem now.  We have some confusion over which pop-up to
> which you are referring.
>
> The experimental API is for a totally separate pop-up that is hosted either
> in a toolstrip, or a tab-contents view of an extension.  It does not
> interact with the pop-up displayed in relation to a browser action.
>
> Quoting Aaron Boodman from a previous thread on the same issue:
>
> That method actually relates to a different feature than the browser
> actions. There is an experimental "popup" feature that is different
> than the popups that go with browser actions. The experimental popup
> is more like an overlay. It allows a small rectangular window with no
> chrome to be placed anywhere over the browser. This close() method
> goes with that.
> It is actually possible to close a browser action popup already by
> calling window.close() inside the popup.
> It isn't possible to *open* a popup on purpose. We were afraid that
> this would get annoying for users and wouldn't be done in a consistent
> way. What is your use case for wanting to open the popup
> programmatically?
>
> Jeff
>
> 2009/11/12 jachymko <[email protected]>
>
>
>
> > Jeff, thanks for your reply!
>
> > One issue is that the close() method doesn't close the popup
> > (window.close() doesn't work, too, as reported here:
> >http://crbug.com/27519).
> > I believe the getPopupView() returns null, but I can't confirm it in
> > this small repro.
>
> > However, the event is not fired even when I dismiss the popup by
> > clicking elsewhere. Any ideas?
>
> > I have the following minimal repro. If you have time to look into it,
> > please paste it into the popup.html in the sample extension I attached
> > tohttp://crbug.com/27519
>
> > Thanks!
>
> > <html>
> > <script type="text/javascript">
> >     chrome.experimental.popup.onClosed.addListener(function()
> >    {
> >        alert('Event Notification: Popup Dismissed');
> >    });
> > </script>
> > <body>
> >    <button id="close"
> > onclick="chrome.experimental.extension.getPopupView().close();">Close</
> > button>
> > </body>
> > </html>
>
> > On Nov 13, 12:23 am, Jeff Timanus <[email protected]> wrote:
> > > Hi,
>
> > > Yes, though there exists a few known glitches with the experimental.popup
> > > API, the onClosed callback should be invoked.  The following example
> > should
> > > work fine, unless you've uncovered an unknown bug:
>
> > > function closePopup() {
> > >   chrome.experimental.popup.onClosed.addListener(function() {
> > >     alert('Event Notification: Popup Dismissed');
> > >   });
>
> > >   chrome.experimental.extension.getPopupView().close();
>
> > > }
>
> > > Jeff
>
> > > 2009/11/12 jachymko <[email protected]>
>
> > > > Hi,
>
> > > > is the experimental.popup API expected to work? I am trying to handle
> > > > the onClosed event, but it's never fired. I'm using Chromium build
> > > > 31837.
>
> > > > Thanks!
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Chromium-extensions" group.
> > > > To post to this group, send email to
> > [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<chromium-extensions%2Bunsu
> > > >  [email protected]><chromium-extensions%2Bunsu
> > [email protected]>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/chromium-extensions?hl=.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<chromium-extensions%2Bunsu 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/chromium-extensions?hl=.

--

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


Reply via email to