Posts
-
I think the ergonomics of generators is growing on me.
I took a stab at getting more familiar with iterators, iterables, and generators. I think I'm starting to like the ergonomics.
Read It -
I guess some request headers are more trustworthy than others.
There's a subset of request headers that can't be modified by a spec-compliant user agent. Let's explore why they're useful for determining how and for what purpose a request was triggered.
Read It -
There are a lot of ways to break up long tasks in JavaScript.
It's very common to intentionally break up long, expensive tasks over multiple ticks of the event loop. But there are sure are a lot of approaches to choose from. Let's explore them.
Read It -
We'll soon be able to slide open a `height: auto` box with native CSS.
Using JavaScript or other creative tricks to animate open a box with unknown contents will soon be a thing of the past. Let's tinker with two new approaches native to CSS.
Read It -
I didn't know you could compose template literal types in TypeScript.
TypeScript's string literal types are a lot more useful than I originally thought.
Read It -
Short-Lived, Tick-Bound Memoization in JavaScript
Sometimes, typical memoization function won't cut it when there are so many changing variables in play between ticks of the event loop. Let's explore how we might fine-tune it.
Read It -
Using Forced Reflows and the Event Loop to Slide Open a Box
Triggering smooth, reliable CSS transitions with JavaScript can be weirdly more complicated than you expect. We're gonna explore it more.
Read It -
You Might As Well Use a Content Security Policy
Content Security Policies, even for simple, content-focused sites, offer good protection against rare but real vulnerabilities out there. You might as well just get one.
Read It -
Avoiding a "Host Permission" Review Delay When Publishing a Chrome Extension
Get a Chrome extension reviewed a smidge more quickly by more carefully executing its client-side scripts only when they're needed.
Read It -
Collect All Requested Images on a Website Using Puppeteer
Walking through how I used Puppeteer to programmatically collect every image loaded when a page is viewed in the browser.
Read It -
TIL: inline event handlers still fire when passed to React's dangerouslySetInnerHTML
Even though it won't run <script> tags, React's dangerouslySetInnerHTML still allows inline event handlers to execute. Here's how you might neutralize that threat.
Read It -
Streaming Text Like an LLM with TypeIt (and React)
We're getting real familiar with seeing LLMs stream chunks of text to a page. Here's a simple demonstration of how you'd mimic the effect with TypeIt.
Read It -
I didn't know you could use sibling parameters as default values in functions.
Default parameter values have been in JavaScript for a while. But I just found out you can use sibling parameters as the default values themselves.
Read It -
Empty Building
I’ve started to notice my stomach bunch up when I come across #BuildInPublic hashtags, or see people throw around phrases like: “Forget everything else. Just get
Read It -
JamComments Now Offers AI-Powered Moderation
You can now use an LLM to moderate new comments submitted through JamComments. Here's the why and how.
Read It