mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
handlers i'll delete later
This commit is contained in:
parent
f5d4f00ae8
commit
2c1e2b7adf
1 changed files with 17 additions and 0 deletions
|
@ -6,6 +6,7 @@ import {
|
||||||
rewriteJs,
|
rewriteJs,
|
||||||
rewriteSrcset,
|
rewriteSrcset,
|
||||||
} from "./shared";
|
} from "./shared";
|
||||||
|
import { documentProxy } from "./window";
|
||||||
|
|
||||||
const attrObject = {
|
const attrObject = {
|
||||||
nonce: [HTMLElement],
|
nonce: [HTMLElement],
|
||||||
|
@ -125,3 +126,19 @@ Object.defineProperty(Element.prototype, "innerHTML", {
|
||||||
return innerHTML.set.call(this, value);
|
return innerHTML.set.call(this, value);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
MutationObserver.prototype.observe = new Proxy(MutationObserver.prototype.observe, {
|
||||||
|
apply(target, thisArg, argArray) {
|
||||||
|
if (argArray[0] === documentProxy) argArray[0] = document;
|
||||||
|
|
||||||
|
return Reflect.apply(target, thisArg, argArray);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.createTreeWalker = new Proxy(document.createTreeWalker, {
|
||||||
|
apply(target, thisArg, argArray) {
|
||||||
|
if (argArray[0] === documentProxy) argArray[0] = document;
|
||||||
|
|
||||||
|
return Reflect.apply(target, thisArg, argArray);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue