Disclaimer: If you're here for the holy grail of bot detection, this may not be it, unless your UX strategy involves surprise popups and your marketing strategy involves blocking Google crawlers.
We recently stumbled across a bug on the Chromium bug tracker where a short JavaScript snippet can crash headless
This kind of sucks for people who have made automation scripts. It could also have consequences for site owners if it affects accessibility tools for disabled users. It could even be considered malicious under certain laws. If you use something like this you should also have an API.