Prevent double script on trusted file:// pages in some edge cases.
This commit is contained in:
parent
cf7d8408f0
commit
e158441412
|
@ -50,7 +50,10 @@
|
||||||
};
|
};
|
||||||
debug("Initial readyState and body", document.readyState, document.body);
|
debug("Initial readyState and body", document.readyState, document.body);
|
||||||
|
|
||||||
let mustFreeze = UA.isMozilla && (!/^(?:image|video|audio)/.test(document.contentType) || document instanceof XMLDocument);
|
let mustFreeze = UA.isMozilla
|
||||||
|
&& (!/^(?:image|video|audio)/.test(document.contentType) || document instanceof XMLDocument)
|
||||||
|
&& document.readyState !== "complete";
|
||||||
|
|
||||||
if (mustFreeze) {
|
if (mustFreeze) {
|
||||||
// Mozilla has already parsed the <head> element, we must take extra steps...
|
// Mozilla has already parsed the <head> element, we must take extra steps...
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue