"Let’s replace JavaScript with something better," says John Ankarström.
https://john.ankarstrom.se/english/texts/replacing-javascript/
I'd love to see that happen, but I don't think he adequately explains what should be done with all of the JS currently in the wild.
I'd honestly settle for browsers handling JS the way they do cookies. Let me decide whether to allow all JS, allow only self-hosted JS, or disable JS entirely -- and let me blacklist/whitelist particular domains.
Is that so fucking hard?
@starbreaker It could be useful on tiny projects (the REST call from HTML for example), but it would also be a huge mistake for big ones: today JS Frameworks have a clean separation of concerns (HTML/CSS/JS => Semantic Content/Rendering/Behavior) that would be completely messed up with this philosophy (and will lead to non-testable code, spaghetti projects and so on).
And we're used to JS magic today, my guess is that most people will activate this on all websites without any curation.
@NicolasConstant I don't give a damn if most people ignore the JS controls and don't bother to lock down their browsers. I just want the option to do it myself.
@starbreaker I will reword my idea: today issue with JS isn't a tech issue. It's a marketing and commercial issue that is been materialized by JS code. If tomorrow we can have behavior logic inside HTML, it will be the same mess than before, but with HTML.
Hopefully, JS is a really open way to do things, you can see what it's doing and even block it.
Tomorrow with WebAssembly... we will lose this capability. We might regret the good old JS at that time.