fix client.frame

This commit is contained in:
Percs 2024-11-05 18:05:59 -06:00
parent 18117e360a
commit c9c98bc70e
2 changed files with 10 additions and 1 deletions

View file

@ -139,7 +139,9 @@ export class ScramjetClient {
get frame(): ScramjetFrame | null {
if (!iswindow) return null;
const frame = this.global.window.frameElement;
const frame = this.descriptors["window.frameElement"]
? this.descriptors["window.frameElement"].get.call(this.global)
: this.global.window.frameElement;
if (!frame) return null; // we're top level
const sframe = frame[SCRAMJETFRAME];