tc39 / Proposal Realms
ECMAScript Proposal, specs, and reference implementation for Realms
Stars: ✭ 703
Labels
ECMAScript spec proposal for Realms API
Status
- Explainer.
- HTML Rendered Spec.
- Currently at Stage 2.
- Code of Conduct
Champions
Index
What are Realms?
Realms 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 Realm {
constructor();
readonly globalThis: typeof globalThis;
import(specifier: string): Promise<Namespace>;
}
See some examples in the Explainer file.
Presentations
- TC39 Meeting, June 4th 2020 - Stage 2 Update
- TC39 Incubator Call May 26th 2020
- TC39 Feb 2020 - Stage 2 Update
- TC39 May 2018 - Stage 2 Request (archived)
History
- we worked on this during ES2015 time frame, so never went through stages process (ES6 Realm Objects proto-spec.pdf)
- got punted to later (rightly so!)
- goal of this proposal: resume work on this, reassert committee interest via advancing to stage 2
- original idea from @dherman: What are Realms?
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
.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].