fix: proxy element.getHTML

This commit is contained in:
Percs 2024-12-06 02:22:17 +00:00 committed by GitHub
parent b5a7598465
commit d821554f57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -220,6 +220,12 @@ export default function (client: ScramjetClient, self: typeof window) {
}, },
}); });
client.Proxy("Element.prototype.getHTML", {
apply(ctx) {
ctx.return(unrewriteHtml(ctx.call()));
},
});
client.Proxy("Element.prototype.insertAdjacentHTML", { client.Proxy("Element.prototype.insertAdjacentHTML", {
apply(ctx) { apply(ctx) {
if (ctx.args[1]) if (ctx.args[1])