isConnected, a node property that attached to a context (i.e.
Here’s how to use
const el = document.createElement('div'); el.isConnected; // false document.body.appendChild(el); el.isConnected; // true
I used to run
parentNode checks on the element to see if it had been injected but that’s not always accurate, so I’m glad
Scrolling “Go To Top” Link Using Dojo
One of the most popular code snippets of posted on my blog has been the scrolling “Go To Top” link snippet. The premise of the snippet is simple: once the user scrolls an element (usually the BODY element) past a given threshold, a “Go…
Do / Undo Functionality with MooTools