Added details to response to fix error

This change fixes an error I was encountering that complained that the return type was not "application/wasm"
This commit is contained in:
CEbbinghaus 2023-04-02 00:01:39 +11:00 committed by GitHub
parent 91149f9dfc
commit 1c6ade62ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,15 @@ function decode() {
for (var i = 0; i < binaryString.length; i++) { for (var i = 0; i < binaryString.length; i++) {
bytes[i] = binaryString.charCodeAt(i); bytes[i] = binaryString.charCodeAt(i);
} }
return (async function() {return new Response(bytes.buffer);})(); return (async function() {
return new Response(bytes.buffer, {
status: 200,
statusText: 'OK',
headers: {
'Content-Type': 'application/wasm'
}
});
})();
} }
export function init_embedded() { export function init_embedded() {