mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
fix ownerDocument
This commit is contained in:
parent
bb4b7f127b
commit
9a39435c7d
1 changed files with 7 additions and 1 deletions
|
@ -177,7 +177,13 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
|
|
||||||
client.Trap("Node.prototype.ownerDocument", {
|
client.Trap("Node.prototype.ownerDocument", {
|
||||||
get(ctx) {
|
get(ctx) {
|
||||||
return client.documentProxy;
|
let doc = ctx.get() as Document | null;
|
||||||
|
if (!doc) return null;
|
||||||
|
|
||||||
|
let scram: ScramjetClient = doc[ScramjetClient.SCRAMJET];
|
||||||
|
if (!scram) return doc; // ??
|
||||||
|
|
||||||
|
return scram.documentProxy;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue