Hacker News new | ask | show | jobs
by Ooveex2C 2809 days ago
Do wasm -> builtin calls, e.g. DOM methods still call the JS code if JS code has been monkey-patched?

E.g. if userscript replaces the built-in window.fetch() API to modify page behavior will wasm also be intercepted?

1 comments

At the moment, wasm can only call functions that were passed as values of the import object which is passed to to one of the instantiation functions (e.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...), so which function gets called is up to the embedding JS code.