mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 15:30:00 -04:00
use the right document
This commit is contained in:
parent
e7cf201083
commit
dd6759b6c4
1 changed files with 7 additions and 1 deletions
|
@ -276,7 +276,13 @@ export default function (client: ScramjetClient, self: typeof window) {
|
|||
],
|
||||
{
|
||||
get(ctx) {
|
||||
return client.wrapfn(ctx.get());
|
||||
const n = ctx.get() as Node;
|
||||
if (!(n instanceof Document)) return;
|
||||
|
||||
const scram: ScramjetClient = n[SCRAMJETCLIENT];
|
||||
if (!scram) return n; // ??
|
||||
|
||||
return scram.documentProxy;
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue