<script src="http://www.coolprop.sourceforge.net/jscript/coolprop.js"></script >
In my HTML, I get CORS errors (see below). I've set the MIME type on the WASM successfully, but this is a classic CORS problem I surmise.
Can somebody point me to an example of a properly functioning publishing of js+wasm combo that can be successfully included in another script in the manner that I have tried to do? The emscripten docs on this topic are decidedly unhelpful: https://emscripten.org/docs/compiling/Deploying-Pages.html#prepare-for-the-web-environmentwasm streaming compile failed: TypeError: NetworkError when attempting to fetch resource. coolprop.js:1651:11falling back to ArrayBuffer instantiation coolprop.js:1652:11Cross-Origin
Request Blocked: The Same Origin Policy disallows reading the remote
resource at
http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.wasm.
(Reason: CORS header ‘Access-Control-Allow-Origin’ missing).[Learn More]both async and sync fetching of the wasm failed coolprop.js:10604:5both async and sync fetching of the wasm failed coolprop.js:10605:5failed
to asynchronously prepare wasm: abort("both async and sync fetching of
the wasm failed") at
jsStackTrace@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1048:13
stackTrace@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1065:12
abort@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:10615:44
getBinary@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1554:7
getBinaryPromise/<@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1568:16
coolprop.js:1638:9abort("both
async and sync fetching of the wasm failed") at
jsStackTrace@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1048:13
stackTrace@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1065:12
abort@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:10615:44
getBinary@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1554:7
getBinaryPromise/<@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1568:16
coolprop.js:10604:5abort("bothCross-Origin
async and sync fetching of the wasm failed") at
jsStackTrace@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1048:13
stackTrace@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1065:12
abort@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:10615:44
getBinary@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1554:7
getBinaryPromise/<@http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.js:1568:16
coolprop.js:10605:5
Request Blocked: The Same Origin Policy disallows reading the remote
resource at
http://www.coolprop.dreamhosters.com:8010/binaries/Javascript/coolprop.wasm.
(Reason: CORS header ‘Access-Control-Allow-Origin’ missing).[Learn More]