News for hackers. Stuff that matters.
Re:How JavaScript works: inside the V8 engine by sjrd on Monday August 21, 2017 @12:33PM (#15065735)
Right, because wasm is there to solve all our performance problems, isn't it?

And how exactly is your jquery.wasm going to access the DOM? Or expose methods to your application, for that matter?

wasm is not a drop-in replacement for JS.

Re:How JavaScript works: inside the V8 engine by markdog12 on Monday August 21, 2017 @01:07PM (#15065958)
There are plans for WebAssembly modules to directly access the DOM: https://github.com/WebAssembly/gc/blob/master/proposals/gc/O...
Re:How JavaScript works: inside the V8 engine by Fifer82 on Monday August 21, 2017 @12:48PM (#15065833)
I really don't know much about wasm.

I just wondered though, from a birds eye view, does using wasm effectively give you control of everything within the "frame" of your browser?

Can I get rid of the DOM(boilerplate aside), get rid of CSS?

For example HTMLCanvasElement is a flat surface. I can do what I want within it as a scene graph renderer.

Could I do that with wasm? Could I invent my own 2D entities (x, y, width, height). My own 2D Constraints resize like Apple Devices etc?

Re:How JavaScript works: inside the V8 engine by skybrian on Monday August 21, 2017 @01:00PM (#15065918)
It's still in the same sandbox as JavaScript. You don't get any new API's. There's only going to be speedup on CPU-intensive things.
Re:How JavaScript works: inside the V8 engine by flavio81 on Monday August 21, 2017 @09:19PM (#15069033)
> wasm is not a drop-in replacement for JS

It is not a "drop-in" replacement in any way, but I'm pretty sure it will eventually replace JS completely.

Re:How JavaScript works: inside the V8 engine by Spivak on Monday August 21, 2017 @12:46PM (#15065819)
No, but if we're being honest, it's exactly what everyone wants it to be. A bytecode for the web.
Re:How JavaScript works: inside the V8 engine by adamnemecek on Monday August 21, 2017 @02:06PM (#15066374)
Eventually the Dom might be replaced with some webgl renderer.