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!

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

Learn More

Open event is not triggered with popup window

more options

I am developing a Firefox add-on using Add-on SDK tool. I am doing something as soon as a tab is opened. I registered for all tab's event( open,ready,close).

   var tabs = require("sdk/tabs");
   tabs.on("open",openTab);
   tabs.on("ready",readyTab);
   tabs.on("close",closeTab);

And i have respective functions for each event Listener. Problem which i am facing is some of the webpages opened in a new window. For those web pages none of the event Listener is firing. Please help me out in this.

By debugging the following function at resource://gre/modules/commonjs/sdk/tabs/tabs-firefox.js

// Detect tabs in new windows windowObserver.on('open', domWindow => {

 if (!isBrowser(domWindow) || ignoreWindow(domWindow))
   return;
 let window = null;
 try {
   modelFor(domWindow);
 }
 catch (e) { }
 for (let tabElement of getTabs(domWindow)) {
   addWindowTab(window, tabElement);
 }

});


When I go to the page "http://www.yourhtmlsource.com/javascript/popupwindows.html", then go to the line "Try it here: » Pop it" and lick on "Pop it", a new popup window appeared, and I found that the function isBrowser(domWindow) always returns FALSE with the popup window.

Please help me the way to make addon SDK make isBrowser(domWindow) return TRUE.

I am developing a Firefox add-on using Add-on SDK tool. I am doing something as soon as a tab is opened. I registered for all tab's event( open,ready,close). var tabs = require("sdk/tabs"); tabs.on("open",openTab); tabs.on("ready",readyTab); tabs.on("close",closeTab); And i have respective functions for each event Listener. Problem which i am facing is some of the webpages opened in a new window. For those web pages none of the event Listener is firing. Please help me out in this. By debugging the following function at resource://gre/modules/commonjs/sdk/tabs/tabs-firefox.js // Detect tabs in new windows windowObserver.on('open', domWindow => { if (!isBrowser(domWindow) || ignoreWindow(domWindow)) return; let window = null; try { modelFor(domWindow); } catch (e) { } for (let tabElement of getTabs(domWindow)) { addWindowTab(window, tabElement); } }); When I go to the page "http://www.yourhtmlsource.com/javascript/popupwindows.html", then go to the line "Try it here: » Pop it" and lick on "Pop it", a new popup window appeared, and I found that the function isBrowser(domWindow) always returns FALSE with the popup window. Please help me the way to make addon SDK make isBrowser(domWindow) return TRUE.

모든 댓글 (1)

more options

Add-on support is over here: https://discourse.mozilla-community.org/c/add-ons

Or you could search the Mozilla Developer Network form an answer. https://developer.mozilla.org/en-US/