in the implementation of WebRequests API in chrome, you can modify a page’s source before the dom tree is even being built using this function:
let filter = browser.webRequest.filterResponseData(details.requestId);
and then using filter.ondata = event => { […]
this function (browser.webRequest.filterResponseData) is completely missing in FF.
it’s quite essential for anything that rewrites the response, like some kinds of adblockers, fingerprinting protection etc.