Search code examples
firefoxfirefox-addonxpcom

How to preprocess HTML before it's loaded and parsed by Mozilla?


I need a way to process HTML before it's actually loaded and parsed by Mozilla. Is there any content listener that I can use in my Firefox extension?


Solution

  • Add an Event Listener to the gBrowser global object, making sure to set usecapture to true. You could also intercept the response.