async-document-write
async-document-write copied to clipboard
Automatically inject document.write tracker code into all async scripts
This will make eval(document.write.START)
and eval(document.write.END)
unnecessary.
If the context is an async script element without an src containing text, add in text and run script.parentNode.replaceChild(document.importNode(script, true), script)
. I will need to disable document.write() entirely before executing the modified tracker code so that initial runs are ignored.
If the context is an async script element with an src, async XHR/Fetch the src, add tracker code, change src to blob URI for the new content, and run script.parentNode.replaceChild(document.importNode(script, true), script)
.