Answer the question
In order to leave comments, you need to log in
Why doesn't document.write work in Firefox?
When I try to rewrite the content of the page, I get an error that it is unsafe: I
SecurityError: The operation is insecure.
run the code from the content script of my own browser extension.
Can you please tell me how can I use document.write in Firefox browser? Maybe there is some tricky setting in the browser configs that disables the ban? Or some special permission for extension manifest?
Answer the question
In order to leave comments, you need to log in
Thanks to Aetae for suggesting a solution that works in Firefox:
document.wrappedJSObject.write(''); document.close();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question