tc39/proposal-realms

ECMAScript Proposal, specs, and reference implementation for Realms

1,585

stars

319

commits

HTML

primary language

Feb 10, 2025

updated

tc39.es/proposal-shadowrealm/

README

ECMAScript spec proposal for ShadowRealm API

Status

Champions

  • @dherman
  • @caridy
  • @erights
  • @leobalter
  • @rwaldron
  • @legendecas

Index

What are ShadowRealms?

ShadowRealms are a distinct global environment, with its own global object containing its own intrinsics and built-ins (standard objects that are not bound to global variables, like the initial value of Object.prototype).

See more at the explainer document.

API (TypeScript Format)

declare class ShadowRealm {
    constructor();
    importValue(specifier: string, bindingName: string): Promise<PrimitiveValueOrCallable>;
    evaluate(sourceText: string): PrimitiveValueOrCallable;
}

See some examples in the Explainer file.

Presentations

History

Contributing

Updating the spec text for this proposal

The source for the spec text is located in spec.html and it is written in ecmarkup language.

When modifying the spec text, you should be able to build the HTML version by using the following command:

npm install
npm run build
open dist/index.html

Alternatively, you can use npm run watch.

Contributors

leobalter

86 commits

caridy

79 commits

jfparadis

52 commits

warner

39 commits

tc39/proposal-realms

ECMAScript Proposal, specs, and reference implementation for Realms

1,585

stars

319

commits

HTML

primary language

Feb 10, 2025

updated

tc39.es/proposal-shadowrealm/

README

ECMAScript spec proposal for ShadowRealm API

Status

Champions

  • @dherman
  • @caridy
  • @erights
  • @leobalter
  • @rwaldron
  • @legendecas

Index

What are ShadowRealms?

ShadowRealms are a distinct global environment, with its own global object containing its own intrinsics and built-ins (standard objects that are not bound to global variables, like the initial value of Object.prototype).

See more at the explainer document.

API (TypeScript Format)

declare class ShadowRealm {
    constructor();
    importValue(specifier: string, bindingName: string): Promise<PrimitiveValueOrCallable>;
    evaluate(sourceText: string): PrimitiveValueOrCallable;
}

See some examples in the Explainer file.

Presentations

History

Contributing

Updating the spec text for this proposal

The source for the spec text is located in spec.html and it is written in ecmarkup language.

When modifying the spec text, you should be able to build the HTML version by using the following command:

npm install
npm run build
open dist/index.html

Alternatively, you can use npm run watch.

Contributors

leobalter

86 commits

caridy

79 commits

jfparadis

52 commits

warner

39 commits

Languages

HTML

100.0%