I'm curious, somehow I remebered as JS not getting executed when opening a html file from filesystem, but clearly that isn't the case since this works. Did this change? Maybe I'm just misremembering
If the JS is embedded within the HTML file it should’ve always worked, but when the HTML loads the JS file from somewhere else (that isn’t a relative path or a full URL that’s hosted somewhere else) it would usually fail, thus it wouldn’t work without running it through some kind of server that resolves the path
script type="module" doesn't work from file systems. To my great annoyance. Other than that, I'm quite certain JS has worked from file systems since it existed.
I wanted the document to be edited without a separate editor.