0

I'm writing a Firefox extension. When a new page is loaded, I need to modify the main HTML AFTER it has been downloaded, but BEFORE it's parsed by the browser.

If it's not clear what I'm saying, look at the accepted answer for this question; After step 1, before step 2.

What JavaScript WebExtension API Event can I use to accomplish this?

Please note that this question does NOT answer my question as gBrowser is depreciated.

Nogatco
  • 13
  • 1
  • 3
  • If you tell us what you would use it for, maybe we can come up with a solution for that specific problem. And why is later in the event flow not an option? – Smile4ever Oct 08 '18 at 14:28
  • Smile4ever I want to replace certain includes(ie. script/link tags) with others, before they are loaded. – Nogatco Oct 09 '18 at 16:30
  • Redirect the requests using webRequest to the new URLs? https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webRequest/onBeforeRequest – Smile4ever Oct 09 '18 at 18:50

0 Answers0