Better HN
topnewbestaskshowjobs
Log inSign up

keinplan

-2 karma · joined May 6, 2021 (5y ago) · 4 submissions

Submissions

comment 5y ago · link · parent

Remote-code-execution as a feature just isn't a good idea. Sandboxes can (and Murphy's Law says they will) be broken out of.

There are many documented browser-exploits and basically all newer ones that are actually a danger to users involve Javascript. It's also not reasonable to assume that people only visit trusted sites.

comment 5y ago · link · parent

I also think that Twine/Client-Side-JS isn't the worst choice here. It takes unnecessary load from the server and is easy to use, at least for the one creating the game.

It's just so frustrating to watch how having loads of Javascript on websites that absolutely don't need it has been normalized. I don't think people should be blamed for using Javascript (or Electron, .NET, whatever), especially for hobby projects. But I also think users shouldn't be silent about it, especially since there are young developers who actually don't know software could be better. It's just such a massive waste of resources and breaks accesibility way to often.

comment 5y ago · link · parent

> Just wish I can only give authorization to certain JS api.

This is already implemented in any browser I know, but for some reason it is available only to some functionality (microphone, camera etc.) but not for eg. Ajax, Cross-Origin Things, Websockets, Canvas2D, WebGL etc.

Also before executing any Javascript browsers should ask if you want this website to execute (potentially malicious) code on your computer!

comment 5y ago · link · parent

Thats what cookies are for.