This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox Addon SDK does not send open event to Popup window

more options

I tried a sample in addon-sdk and found the following behaviour.

Main.js:

var windows = require("sdk/windows").browserWindows; for each (var window in windows) {

 console.log(window.title);

} console.log(windows.length); windows.on('open', function(window) {

 console.log(windows.length+"open");

});

Using the website http://www.yourhtmlsource.com/javascript/popupwindows.html to test. Go to the section containing the phrase "Try it here: » Pop it", then click on "Pop it", a new winfow is opened but the open event is not triggered (windows.on('open'...); is not called)

Since I am new to Firefox SDK development, could you help me. Thanks.

I tried a sample in addon-sdk and found the following behaviour. Main.js: var windows = require("sdk/windows").browserWindows; for each (var window in windows) { console.log(window.title); } console.log(windows.length); windows.on('open', function(window) { console.log(windows.length+"open"); }); Using the website http://www.yourhtmlsource.com/javascript/popupwindows.html to test. Go to the section containing the phrase "Try it here: » Pop it", then click on "Pop it", a new winfow is opened but the open event is not triggered (windows.on('open'...); is not called) Since I am new to Firefox SDK development, could you help me. Thanks.

All Replies (1)

more options

Try asking in the add-on support forum.

https://discourse.mozilla-community.org/c/add-ons