if (window.location.pathname.startsWith('/custom_protocol_page2')) {
console.log("hello from javascript in page2");
} else {
console.log("hello from javascript in page1");
if (typeof WebAssembly.instantiateStreaming !== 'undefined') {
WebAssembly.instantiateStreaming(fetch("/custom_protocol_wasm.wasm"))
.then(wasm => {
console.log(wasm.instance.exports.main()); });
} else {
fetch("/custom_protocol_wasm.wasm")
.then(response => response.arrayBuffer())
.then(bytes => WebAssembly.instantiate(bytes))
.then(wasm => {
console.log(wasm.instance.exports.main()); });
}
}