Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible for chrome extensions #1

Open
qalqi opened this issue Jul 29, 2021 · 0 comments
Open

Incompatible for chrome extensions #1

qalqi opened this issue Jul 29, 2021 · 0 comments

Comments

@qalqi
Copy link

qalqi commented Jul 29, 2021

This package doesn't work with chrome extensions

// Don’t use this! (async () => { const response = await fetch('fibonacci.wasm'); const buffer = await response.arrayBuffer(); const module = new WebAssembly.Module(buffer); const instance = new WebAssembly.Instance(module); const result = instance.exports.fibonacci(42); console.log(result); })();

//do this~ (async () => { const response = await fetch('fibonacci.wasm'); const buffer = await response.arrayBuffer(); const module = await WebAssembly.compile(buffer); const instance = await WebAssembly.instantiate(module); const result = instance.exports.fibonacci(42); console.log(result); })();

https://developers.google.com/web/updates/2018/04/loading-wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant