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.
declare class ShadowRealm {
constructor();
importValue(specifier: string, bindingName: string): Promise<PrimitiveValueOrCallable>;
evaluate(sourceText: string): PrimitiveValueOrCallable;
}
See some examples in the Explainer file.
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
.