Re:WebAssembly
by CraftThatBlock on Saturday February 27, 2021 @07:33PM
(#26289557)
You can still block those blobs, as they too are loaded by URL.
[ Parent
| on HN ]
what i am envisioning here is the content of a webpage compiled with ads therein. it would be desirable by the googles of the world for this very reason.
Re:WebAssembly
by catlifeonmars on Saturday February 27, 2021 @08:02PM
(#26289710)
This is still possible using JavaScript, and yet it is not widely seen.
You can think of WebAssembly as another mechanism for executing code in the browser in the context of a web page. JavaScript is still required to (1) load the wasm binary, (2) evaluate it and (3) connect it to DOM APIs or really anything outside of the isolated wasm execution context.
How you block some forms of tracking/ads is you inject your own STUB javascript functionality before the offending script loads.
https://github.com/uBlock-user/uBO-Scriptlets
This wont work with webassembly.
None of these scriptlets would break if a site uses WASM, they're utilities for things like adding/removing/mutating elements from the DOM, modifying localStorage, stopping alert()
executesitefunction.js could arguably be effected, but that relies on a site installing a particular function on window, which isn't required when using JS, and could be still done where the function is backed by WASM
Hmm this repo doesnt have the currently used scriptlets.js file, weird. I think this is the official one https://git.furworks.de/opensourcemirror/ublock-origin/src/b...
A lot of stubs, a lot of functionality to kill a script when tripping certain trigger action, or force some properties.
Don't worry, won't be likely to happen - the ads that are displayed now as banners are literally bid on when it's loading, so at most the ad serving code would be bundled, but you would still be able to block the binaries they load.
This can happen as it stands with JS too, though.
Re:WebAssembly
by qbasic_forever on Saturday February 27, 2021 @09:14PM
(#26290065)
Advertisers would hate that kind of model. They want perfectly targeted and customized ads for each individual viewer. Baking the ads into the content or page itself would be going back about 20 years in their world.
They can bake the ad servers side in the binaries.
They could do bake ads in JS too, but websites aren’t really incentivized to do so as it would increase latency and complexity.