How To Detect User-Defined Window Globals with JavaScript (Enhanced)
An async, error-resilient globals detector: spins up an iframe baseline, categorises the diff by type, and lets you exclude known third-party noise.
Category
9 posts in this category.
An async, error-resilient globals detector: spins up an iframe baseline, categorises the diff by type, and lets you exclude known third-party noise.
Inside MintMinds RequestLite: a Manifest V3 Chrome extension that redirects production script URLs to localhost and live-reloads tabs over WebSocket.
A tiny IIFE that compares window against a fresh iframe to list every user-defined global, grouped by type — handy for auditing third-party noise.
Why HTMLElement.click() silently fails on SVG, and the modern MouseEvent-dispatch one-liner that actually triggers the click on any element.
A tiny config-driven helper that builds, attributes, and inserts DOM nodes in one call — the primitive that powers most of my A/B test variants.
How wrapping querySelector in a MutationObserver kills the FOUC in A/B tests — your variant fires the instant the target element lands in the DOM.
Replacing my old rAF-based viewport tracker with IntersectionObserver — the simpler, lazier, dramatically less complicated way to fire A/B test events.
A pocket-sized click introspection helper that JSON-stringifies the source element, its index, text, and every attribute — useful as A/B test custom tracking.
A tiny defensive wrapper that picks console.dir for objects and arrays and console.info for primitives — back when Firebug and Chrome disagreed about logging.