1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Protection for document.write and document.wirteln broke in Firefox 69

Fixes #357
This commit is contained in:
kkapsner 2019-05-29 00:20:27 +02:00
parent b7d888dee1
commit 308592e785
2 changed files with 7 additions and 0 deletions

View file

@ -142,6 +142,9 @@
const documentWriteDescriptor = Object.getOwnPropertyDescriptor(
wrappedWindow.HTMLDocument.prototype,
"write"
) || Object.getOwnPropertyDescriptor(
wrappedWindow.Document.prototype,
"write"
);
const documentWrite = documentWriteDescriptor.value;
documentWriteDescriptor.value = exportFunction(function write(str){
@ -161,6 +164,9 @@
const documentWritelnDescriptor = Object.getOwnPropertyDescriptor(
wrappedWindow.HTMLDocument.prototype,
"writeln"
) || Object.getOwnPropertyDescriptor(
wrappedWindow.Document.prototype,
"writeln"
);
const documentWriteln = documentWritelnDescriptor.value;
documentWritelnDescriptor.value = exportFunction(function writeln(str){