About Sam Sam's head

Popular Posts

How I Learnt To Stop Worrying And Love Animating The Box Model

Or, let's talk about accordions. 🪗

Node.js Streams & Object Mode

Streams for bytes are rarely useful, and objectMode can be made better.

Understanding Load Events on the Web

We use the load and DOMContentLoaded events in our scripts, but do you understand why?

Check your JS with TS

You have a JS-only ESM project and want TS' type-checking. Follow this easy guide.

Inert in HTML

How to make your elements and subtrees inert—unclickable and unfocusable—in HTML.

Web Font Loading & The Status Quo

Is font-display right for you?

Recent Posts

Plex, Ubuntu & Quadro Cards on AMD

AMDs don't do hardware transcoding. You can buy a Quadro card and it works in Ubuntu / Linux.

Sents File Watcher for Node

A pure-JS file watcher with no dependencies.

Disposable Web Components

Web Components are described as re-usable. What if instead, we can dispose of them and restart whenever we like?

Async functions & microtasks

A brief interlude on async, Promise, and execution order.

Make Async Methods Sync in Node.js

You shouldn't block the main thread to make async methods sync... unless, hmmmm? 🤔💭

Smart Switches

Home Automation through smart switches.

UX, meaning and singular focus

Consoles present modals when they want user input, such as from the keyboard. Can we apply this to the web?

Observing rendered DOM nodes

Observe DOM appearance, size and and rendering position on a page.