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

Can't preload files/shared libs in service worker due to lack of XHR [PR OPEN] #22003

Closed
seanmorris opened this issue May 26, 2024 · 0 comments · Fixed by #22015 · May be fixed by #22016
Closed

Can't preload files/shared libs in service worker due to lack of XHR [PR OPEN] #22003

seanmorris opened this issue May 26, 2024 · 0 comments · Fixed by #22015 · May be fixed by #22016

Comments

@seanmorris
Copy link
Contributor

seanmorris commented May 26, 2024

Service workers no longer allow XHR-based requests (not sure if they ever did) so we can't load file packages or shared libraries without using fetch(). The following PR allows the user to compile with -sUSE_FETCH to correct this:

#22002

@seanmorris seanmorris changed the title Can't preload files/shared libs in service worker due to lack of XHR Can't preload files/shared libs in service worker due to lack of XHR [PR OPEN!] May 26, 2024
@seanmorris seanmorris changed the title Can't preload files/shared libs in service worker due to lack of XHR [PR OPEN!] Can't preload files/shared libs in service worker due to lack of XHR May 26, 2024
@seanmorris seanmorris changed the title Can't preload files/shared libs in service worker due to lack of XHR Can't preload files/shared libs in service worker due to lack of XHR [PR OPEN] May 26, 2024
sbc100 pushed a commit that referenced this issue May 30, 2024
…22015)

This PR switches requests for Wasm files to be loaded with `fetch()` rather than `XMLHttpRequest()`.

This fixes running in service workers where `XMLHttpRequest` is not available.

Partially fixes #22003, only applies to Wasm files.
msorvig pushed a commit to msorvig/emscripten that referenced this issue Jun 4, 2024
…mscripten-core#22015)

This PR switches requests for Wasm files to be loaded with `fetch()` rather than `XMLHttpRequest()`.

This fixes running in service workers where `XMLHttpRequest` is not available.

Partially fixes emscripten-core#22003, only applies to Wasm files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment