← All topics

JavaScript

All writing →

11 posts filed under JavaScript, newest first.

2 min

Intl.NumberFormat

Currency formatting is in the browser, has been for years, and is still being done with a hardcoded dollar sign and a call to toFixed in most of the code I read.

JavaScript Small Print
2 min

AbortController

The thing everybody knows as the way to cancel a fetch is also the tidiest way to remove a pile of event listeners, and the second use has changed more of my code than the first.

JavaScript Small Print
8 min

Thumbnails and heroes

A designer sent over a few seconds of the client's own phone app, where a tapped product photo grows into the hero image on the next screen, with a note asking whether the website could do that.

CSS JavaScript
8 min

Four sentences somebody could check

A client asked what progressive enhancement meant in practice and the 4 of us in the room produced about 90 seconds of gesturing, not one word of which anybody could have written down.

JavaScript HTML
10 min

Nothing was loading

A category page came back from the back button with nothing on it, and every card was already in the DOM at opacity 0, waiting on a scroll event that had come and gone before my script was listening.

JavaScript Performance
9 min

Focus went to the logo

I applied a filter on a client's product listing with the keyboard and the next Tab put me on the site logo, which is the browser doing exactly what it's supposed to do with a focused element that stopped existing.

Accessibility JavaScript
7 min

One letter behind

I rewrote a staff directory with hooks the week they landed, and the search box started returning the results for whatever I'd typed a keystroke earlier.

React JavaScript
8 min

Only mine was broken

A client's nav collapsed at the wrong width on my machine and nobody else's, and it took two days to find out that the four of us had four different copies of the same dependencies.

Tooling JavaScript
5 min

var, let, and the one I still use

ES6 is arriving all at once through a transpiler, which means that adopting it is a series of individual choices instead of one and some of those features have earned it more than others.

JavaScript