Sam Thorogood

javascript

Kuto, a reverse JS bundler

Cut your JavaScript down to size…I guess? ✂️

CJS Equivalency

Some musings on CJS vs ESM and how to support old code

AWS Amplify Is A Grift

Something something Amplify is bad

AbortController for expiry

The AbortController can be flipped on its head for memoized/cached values. Learn how.

Focus Management in 2022 📺

I spoke about <dialog> and inert! Watch it, plus read an addendum. 👀

Event-Driven JavaScript Development

You should be building objects that emit their own events in JS. Learn how!

Cross-Tab Title Hints

Hidden tabs can be made to work for your users—find out how 👀

AbortController is your friend

The AbortController is ostensibly for fetch, but it has some other ways we can use it too.

Unit Testing React without Jest

Using the power of JSDOM, we can avoid Jest and its legacy code completely.

Builtin Node.js Testing

It's 2022, and you can test your Node.js code without ANY dependencies 🥳

(P)react vs Web Components: a Xoogler's perspective

My job was Web Components! For years! Read some thoughts.

Code golf & the art of CSV parsing

What your minifer doesn't know, might hurt you.

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? 🤔💭

Inert in HTML

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

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.

Check your JS with TS

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

Async Generators for User Input

Use a native-like event loop on the web.

Node.js Streams & Object Mode

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

Better convenience methods for HTML

Beyond appendChild and friends

What To Expect When You're Expecting To Drop IE11

50+ web features you can use when you say 👋 to IE11 support!

Santa Tracker @ BrooklynJS

Fast GIF parsing on the web with WASM + Wuffs

ES6 Modules & Polymer

The Web Is Dead! Long Live The Web!

ES6 Modules in the Real World

Focus inside Shadow DOM

Wherein I explain some concepts about how the browser treats focus inside Shadow DOM, and how you as a developer can get access to it.