Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Iskanje po podpori

Izogibajte se prevarantski tehnični podpori. Nikoli vam ne bomo naročili, da pokličete telefonsko številko ali nam pošljete osebne podatke. Sumljivo dejavnost prijavite z gumbom »Prijavi zlorabo«.

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.

Vsi odgovori (1)

more options

Try asking in the add-on support forum.

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