use the right document

This commit is contained in:
velzie 2024-10-11 16:39:11 -04:00
parent e7cf201083
commit dd6759b6c4

View file

@ -276,7 +276,13 @@ export default function (client: ScramjetClient, self: typeof window) {
], ],
{ {
get(ctx) { 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;
}, },
}, },
); );