3 ms·
All of the old Java (and ActiveX, ewww) was operating under the principle that you'd grant the applet more permissions than javascript, whereas WASM grants the
by fizx 5y ago
All of the old Java (and ActiveX, ewww) was operating under the principle that you'd grant the applet more permissions than javascript, whereas WASM grants the same or fewer permissions!
- jeffbee 5y agoBut for a program like ImageMagic or 7Zip to have any utility, it must be reading and writing files somewhere. I'm just trying to figure out why I would download and run a wasm program to handle these tasks. Why would I trust it?
- fizx 5y agoIt could be reading and writing to a virtual filesystem in your browser. You could then view the transformed file inside the browser as well.
- cxr 5y agoThe HTML5 standard has included the ability to read files for longer than ECMA-262 has had modules and classes (which has already been quite some time—those appeared in ES2015). Writing files is a different matter, but you can easily prompt the user with the browser-native download manager when your app has finished processing the input and the user indicates they want to save. This, too, has been available for a long time. The Chrome team has introduced a new, experimental file access API, but it's not strictly necessary for any of this and probably gives up too much power[1]. Before that, there were the DOM Load and Save APIs (2002)[2], which never got implemented. The future would look less grim if they chose instead to do something like reboot Google Gears, providing a supplemental component that implemented e.g. the remoteStorage protocol that just happened to use your local disk for its backing store—but in a way that's completely transparent to the web app, which shouldn't even be concerned with things like that. It would also translate much better for mobile devices, too, which may or may not have any notion of a desktop-like file system exposed to the user. 1. https://news.ycombinator.com/item?id=30766276 https://news.ycombinator.com/item?id=30766276 2. http://www.w3.org/TR/DOM-Level-3-ASLS http://www.w3.org/TR/DOM-Level-3-ASLS
- tyingq 5y agoWell, partially because browser javascript has more permissions and features now than it used to.