Lo, at stage two and point-seven of the ECMAScript standard proposal process, there stands a gate to a dark reflection of our own realm — a realm the light can never touch, where only the fleeting shadows of our banished code can dwell. Fear not, traveler: at such time as the ShadowRealm is loosed upon the web platform, this talk will see that you stand at the ready to command its dark and fearsome majjycks!
Okay, okay — but with a name like "ShadowRealm," how could I resist? This proposal would introduce a new kind of realm specifically designed for isolation, allowing us to offload code to a "clean room" realm with its own global and built-in objects but _not_ its own execution context. The proposed syntax is exceptionally simple and the theoretical use cases are solid, but how useful would a ShadowRealm be in practical terms? What problems would it solve; what problems would it _fail_ to solve? Will I be able to resist showing up for this talk in a wizard costume (I will absolutely be able to resist this, yes)? In this talk we'll take a guided tour of the ShadowRealm proposal, no runes or portals required.
This talk has been presented at JSNation US 2026, check out the latest edition of this JavaScript Conference.
















