mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-17 08:00:02 -04:00
feat: proxy domparser.parsefromstring
This commit is contained in:
parent
778464a862
commit
ebf3c9c4c4
1 changed files with 13 additions and 0 deletions
|
@ -257,6 +257,19 @@ export default function (client: ScramjetClient, self: typeof window) {
|
|||
},
|
||||
});
|
||||
|
||||
client.Proxy("DOMParser.prototype.parseFromString", {
|
||||
apply(ctx) {
|
||||
if (ctx.args[1] === "text/html") {
|
||||
ctx.args[0] = rewriteHtml(
|
||||
ctx.args[0],
|
||||
client.cookieStore,
|
||||
client.meta,
|
||||
true
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
client.Proxy("document.write", {
|
||||
apply(ctx) {
|
||||
ctx.args[0] = rewriteHtml(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue