Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Firefox Addon SDK does not send open event to Popup window

  • 1 trả lời
  • 1 gặp vấn đề này
  • 2 lượt xem
  • Trả lời mới nhất được viết bởi the-edmeister

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.

Tất cả các câu trả lời (1)

more options

Try asking in the add-on support forum.

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