Skip to content

Commit

Permalink
Add 'self' global
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Nov 21, 2023
1 parent 1fcb573 commit 35c7e3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions quickjs-atom.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ DEF(indices, "indices")
DEF(status, "status")
DEF(reason, "reason")
DEF(globalThis, "globalThis")
DEF(self, "self")
DEF(bigint, "bigint")
#ifdef CONFIG_ATOMICS
DEF(not_equal, "not-equal")
Expand Down
4 changes: 4 additions & 0 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -47075,6 +47075,10 @@ void JS_AddIntrinsicBaseObjects(JSContext *ctx)
JS_DefinePropertyValue(ctx, ctx->global_obj, JS_ATOM_globalThis,
JS_DupValue(ctx, ctx->global_obj),
JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE);

JS_DefinePropertyValue(ctx, ctx->global_obj, JS_ATOM_self,
JS_DupValue(ctx, ctx->global_obj),
JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE);
}

/* Typed Arrays */
Expand Down

0 comments on commit 35c7e3e

Please sign in to comment.