by asim · 3y ago · 0 comments
You can open up the DevTools and start poking around - including running your own JS against the page DOM using the console.
You can write bookmarklets, or user scripts, or even fill browser extensions that run your own custom scripts.
You can even run a headless browser to automate this stuff further - a trick I use a bunch with my shot-scraper CLI tool, see https://simonwillison.net/2022/Mar/14/scraping-web-pages-sho... and https://til.simonwillison.net/shot-scraper/scraping-flourish
It might be not as interactive as mostly of websites, but it allows you to get data through API or develop own client.
We could have tested those idea in a similar fashion as React and next.js in Javascript, and incorporate what works as native HTML. Before sort of refactoring HTML into something else.
But Google doesn't want that. Google wants everything on the web to be Javascript. So yes. Blame Google.
As much as I wanted it to work out (and tried making a personal website using it for a little while), I would never go back to it today.
Wouldn't it make it much easier to parse? Or does the motivation to "make stuff still try to work even when it's clearly broken" override that? (The same motivation gave us everything that's wrong with JavaScript, so I'm not sure I agree with it...)
But HTML can be also written in some absolute quirky way that isn't even SGML. Just a horrible mess!