WebAssembly in Content script

Hi Guys,

I try to use webassembly in my extension, everything works fine, i injected the wasm file in my content script, i see what i print in wasm, but when i try to call a function from my wasm file i see this error " [Extension works Chrome on but doesn’t work on firefox due to [Object] or [Array] XrayWrapper". Any idea?

Thanks a lot, and sorry for my bad english

Sounds like you’re injecting the WASM file into the page context, since afaik it’s pretty complicated to load it into the content script context. See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts on how to interact with the page context.

1 Like

seems that my wasm file do that, i just finish all my ideas :frowning: . I used cloneInfo, exportFunction but the same think, if i inject wasm file in background file, works perfectly.

Is someone that try to use wasm in a content script ?