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 →Notes on JavaScript, PHP, WordPress, design, performance, and the practical side of shipping better digital products.
Topics covered
The blog is designed to support both technical readers and clients who want clearer language around scope, quality, and implementation decisions.
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 →