Comment by yoz
20 hours ago
The File System Access API can do this, and it works in local ("file:///") HTML files, but it's only currently supported in desktop Chromium browsers: https://caniuse.com/native-filesystem-api
However, every browser will let you download a new version of the HTML file and save it over the old one - yes, even from a local HTML file:
const blob = new Blob(['<!DOCTYPE html>\n' +
document.documentElement.outerHTML],
{ type: 'text/html' });
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'mypage.html';
a.click();
... but you need the user to do this for every update. So we're back to manual "Save" buttons.
This is the approach Bento took I believe (similar idea, but just for decks): https://github.com/nyblnet/bento.
Saw it on HN a few weeks back