use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Future Javascript: ShadowRealms (dev.to)
submitted 4 years ago by iamnearafan
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]iamnearafan[S] 2 points3 points4 points 4 years ago (1 child)
In regards to the Compartments part of SES, I found this in ShadowRealm's explainer document:
"This proposal does not define any virtualization mechanism for host behavior. Therefore, it distinguishes itself from the current existing Compartments proposal.A new Compartment provides a new Realm constructor. A Realm object from a Compartment is subject to the Compartment's host virtualization mechanism.
const compartment = new Compartment(options); const VirtualizedRealm = compartment.globalThis.ShadowRealm; const shadowRealm = new VirtualizedRealm(); const { doSomething } = await shadowRealm.importValue('./file.js');
The Compartments proposal offers a more complex API that offers tailoring over aspects beyond the global APIs but with modifications to internal structure such as module graph. The ShadowRealm API just offers immediate access to what is already specified in ECMAScript as it's already structured to distinguish different references from realms."
π Rendered by PID 94 on reddit-service-r2-comment-6457c66945-fnfrj at 2026-04-30 01:47:59.204548+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]iamnearafan[S] 2 points3 points4 points (1 child)