ShadowRealms: Where the Proposal Stands, and What Isolation You Should Use Today
TC39 ShadowRealm: a fresh global for untrusted JS, how it differs from iframes and workers, and why production isolation is still not 'just new ShadowRealm'.
Category
24 articles · 81 min of reading
TC39 ShadowRealm: a fresh global for untrusted JS, how it differs from iframes and workers, and why production isolation is still not 'just new ShadowRealm'.
importmap JSON, bare specifiers in the browser, integrity, and the production limits that keep Vite in the toolchain.
ES Object.groupBy / Map.groupBy: keyed buckets, insertion order, and when a Map of arrays beats a plain object of arrays.
Promise.withResolvers() as standard library: one promise, exposed resolve/reject, and the queue/test patterns that no longer need a Deferred class.
ECMAScript iterator helpers: lazy map and filter on iterators, why they are not Array extras, and the prototype they live on.
A practical walkthrough of measuring Interaction to Next Paint and the concrete techniques for cutting down long input handlers that cause it.
When worker threads should share a buffer, how Atomics.wait and compareExchange actually work, and the security history that still gates SAB.
How to cancel fetches, timeouts, and composed async work with AbortSignal, without leaking listeners or racing the next request.
Renders are not DOM updates. Understand what actually triggers a render, what reconciliation does, and when memoization earns its keep.
Web Components promise framework-agnostic UI, but the interop details — props vs attributes, events, and Shadow DOM styling — are where real integration breaks.
Controlled inputs became the reflexive default in React, but uncontrolled forms are often simpler, faster, and closer to how the platform already works.
The state management debate settled into a layered answer: different tools for local, cross-cutting, and server state, not one library for everything.
A practical workflow for finding and fixing JavaScript memory leaks in browser apps using heap snapshots, detached DOM detection, and retainer analysis.
Intl.NumberFormat, RelativeTimeFormat, ListFormat, and Segmenter replace most hand-rolled formatting and i18n code — here's how to actually use them.
Most useEffect bugs come from using it as a general-purpose lifecycle hook. Here's how to tell when you actually need it — and when you don't.
Why the legacy Date object keeps causing bugs, what Temporal's PlainDate, ZonedDateTime, and Instant types fix, and how to plan a real migration.
A practical tour of the regex features worth mastering — named groups, lookaround, sticky matching, Unicode properties — and when to reach for a parser instead.
How WeakMap, WeakRef, and FinalizationRegistry actually work, where each one earns its place, and why most of them belong in library code, not app code.
A practical look at where ESM and CommonJS interop still breaks in 2026, and how to pick a module format for a new library or app without regret.
Real-world Proxy traps for validation, reactivity, and guardrails, plus why Reflect exists and when skipping it silently breaks your object.
How the iterator protocol and generator functions work under the hood, and where they solve real problems like pagination and lazy sequences.
A practical guide to choosing between Promise.all, allSettled, race, and any, with the failure modes each one is actually designed to handle.
Where closures actually show up in production JavaScript — memoization, private state, React hooks, and the memory leaks they quietly cause.
A precise walkthrough of how the JS event loop orders microtasks and macrotasks, with the interleaving bugs that actually bite in production code.