Problem enabling SharedArray support in WASM app

Hi,

I’m working on a WASM app that needs SharedArray suppor as it uses multithreading. For SharedArray support (and in firefox only apparently), I apparently have to add the following HTTP headers to ‘top level’ documents:

Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin

This works, but it also causes my css to fail to load (I use w3.css):

I get an ‘NS_ERROR_DOM_CORP_FAILED’ in the network debug panel in firefox.

It’d be nice to be able to do both!

Am I doing something wrong, or it there a way around this?

Bye!
Mark

Hi Mark,

The issue you’re encountering with CORS (Cross-Origin Resource Sharing) restrictions in Firefox is a known challenge when using SharedArray in WASM apps alongside external resources like CSS. While Firefox requires the Cross-Origin-Embedder-Policy: require-corp header for SharedArray functionality, it can conflict with other resources loaded from different origins.