Given my penchant for minimal test cases and
local applications, I sometimes run into situations
where I can’t load external JavaScript files. Typically that’s because ESM is
unsupported for file:// URIs or
because I don’t wanna rely on additional assets for a Web Worker.
I’ve always liked
Python’s defaultdict
and occasionally find myself reimplementing it in other languages, notably
JavaScript – typically for some kind of dynamic indexing.
I probably create dozens of HTML documents each month, usually for experiments
or minimal test cases.
Consequently, I’ve long maintained a carefully crafted HTML template, included
below, which I typically reduce to only retain pieces that are strictly
necessary (e.g. removing the external style sheet or .stack utility).