structuredClone Replaces JSON Hacks
structuredClone(value) performs a deep clone of complex objects — including Map, Set, Date, RegExp, and circular references — without going through JSON.This eliminates the JSON.pa…
Read article →structuredClone(value) performs a deep clone of complex objects — including Map, Set, Date, RegExp, and circular references — without going through JSON.This eliminates the JSON.pa…
Read article →The <dialog> element ships native modal behaviour: show() for non-modal, showModal() for blocking. The browser handles focus trapping, Escape to close, and the top layer…
Read article →The Popover API adds popover as an HTML attribute and popovertarget as a trigger. Click a button with popovertarget="menu" and the linked element becomes a…
Read article →Add loading="lazy" to any <img> or <iframe> below the fold and the browser defers loading until the element nears the viewport. No JavaScript required.Pair it…
Read article →Speculation Rules let you tell Chrome to prefetch or prerender pages a user is likely to visit. Add a <script type="speculationrules"> with a JSON config…
Read article →Beyond fetch, AbortSignal is now accepted by addEventListener, setTimeout, setInterval, and many Node APIs.The cleanest pattern: pass a signal to the constructor of a long-lived…
Read article →URLPattern is a built-in matcher for URL paths and full URLs. new URLPattern({pathname: '/users/:id'}).exec(input) returns named groups without hand-rolled regex.It supports wildca…
Read article →TypeScript 5.0 shipped Stage 3 decorators that match the eventual JavaScript proposal. @logged on a method or @Component on a class works without the experimental…
Read article →Node 22 lets you mix CommonJS and ESM more freely. Set "type": "module" in package.json or use the .mjs extension and import just works.The require(esm)…
Read article →The Web Animations API gives JavaScript control over CSS animations with composition, playback, and timeline syncing. element.animate(keyframes, options) returns an Animation objec…
Read article →