搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Webextension run_at in manifest.json not working correctly

  • 1 个回答
  • 2 人有此问题
  • 2 次查看
  • 最后回复者为 Paul

more options

You can define to load a page at a certain time of building DOM using run_at: for example with parameter page_start. this isn't working either. it seems to me that either the script is being run asynchronous, or there is some other reason for this not to be working: aall=document.getElementsByTagName("*"); for (var i=0, max=aall.length; i < max; i++) { aall.addEventListener=function(a,b,c){ console.log("Log"); return false; }; } console.log("Log"); is never being called, even though an event has been added to the element using addEventListener. My current solution for this is an own firefox fork that overwrites the functions in the javascript engine, which is kind of overdosed.

You can define to load a page at a certain time of building DOM using run_at: for example with parameter page_start. this isn't working either. it seems to me that either the script is being run asynchronous, or there is some other reason for this not to be working: aall=document.getElementsByTagName("*"); for (var i=0, max=aall.length; i < max; i++) { aall.addEventListener=function(a,b,c){ console.log("Log"); return false; }; } console.log("Log"); is never being called, even though an event has been added to the element using addEventListener. My current solution for this is an own firefox fork that overwrites the functions in the javascript engine, which is kind of overdosed.

被采纳的解决方案

Hi

if you have a question about add-on development, I recommend you ask in the main add-on forums at https://discourse.mozilla.org/c/add-ons.

定位到答案原位置 👍 0

所有回复 (1)

more options

选择的解决方案

Hi

if you have a question about add-on development, I recommend you ask in the main add-on forums at https://discourse.mozilla.org/c/add-ons.