简体   繁体   English

如何在 firefox 插件中添加监听器?

[英]How to add listener in firefox addon?

i've add on load event like我已经添加了加载事件,例如

window.addEventListener("load", function() { myExtension.init(); }, false);

i want to know the the code the following two events:我想知道以下两个事件的代码:

  • Before any pictures/flash/js are download在下载任何图片/flash/js 之前
  • When the page stops loading due to any reason (may be the user当页面由于任何原因停止加载时(可能是用户
    stopped it or any anyther reason)停止它或任何其他原因)

Thank you for the help...感谢您的帮助...

Use the DOMContentLoaded event.使用 DOMContentLoaded 事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM