> Don't roll your own page scrolling. browser should not even let the page see this action > Don't roll your own link navigation. browser should not even let the page see this action > Don't roll your own text selection. browser should not even let the page see this action > Don't roll your own copy and paste. browser should not even let the page see this action I'm serious. WHY javascript code is even allowed to see…
> WHY javascript code is even allowed to see all these actions of the user? scrolling: used by games, maps, image viewers link navigation: used for client-side routing (youtube/twitch, any website with a chat window) text selection and copy/paste: word processors, spreadsheet editors, forum software, etc. I'm not sure if your question was sincere or if you were trying to say that the web should not support these use…
Features paramount in a document viewer (broadly, "respect the user's local document viewing preferences") aren't desirable in a general purpose application platform.
A large number of companies/web developers don't think of themselves as offering the user a document to view on their own terms, but rather an "experience" that they want full control over (which means, most of the time: show ads and record user behavior).
If you're offering me a game, fair enough. But if you're showing me my hotel reservation or electric bill, I want a document, not an ""experience"".