简体   繁体   中英

Developing Firefox Extension, load extension at Dom start

I have been writing Firefox extension but stuck at this point that do we have any simple option for "load extension on DOM start" ,as we have in chrome , in manifest.json file:

"run_at": "document_start"

my research found on page load , progress listner like stuff ,but they are a lot of code as compared to chrome's 'run_at' .

so are they the only option for Firefox extension developers? or we have somethig else, which I may have missed.

btw , I am using addeventlistner to detect that for now.

Extensions as a whole are loaded when the browser session loads, they are not tied to individual pages.

Within an extension you can inject code into individual tabs via the page-mod or the tabs modules.

I general I suggest you discard the this is how chrome APIs work, where is the drop-in replacement in firefox mindset if you're building SDK addons. The API and addon structure is quite different, so that won't get you far.

@JaromandaX already mentioned webextensions, which mimic chrome apis, but they're still under development.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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