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 to http://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]> > > . > > 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=.
