proxy Element.prototype.insertAdjacentHTML, rust docs work perfectly now.

This commit is contained in:
wearrrrr 2024-10-17 19:49:35 -05:00
parent 6705d0ba2b
commit a748053085
2 changed files with 16 additions and 4 deletions

View file

@ -237,6 +237,18 @@ export default function (client: ScramjetClient, self: typeof window) {
},
});
client.Proxy("Element.prototype.insertAdjacentHTML", {
apply(ctx) {
if (ctx.args[1])
ctx.args[1] = rewriteHtml(
ctx.args[1],
client.cookieStore,
client.meta,
true
);
},
})
client.Trap("HTMLIFrameElement.prototype.contentWindow", {
get(ctx) {
const realwin = ctx.get() as Window;