From 992a0a73376b4b6fb0963fd843fe2873ad876732 Mon Sep 17 00:00:00 2001 From: Sergey Rubanov Date: Mon, 10 Dec 2018 02:18:45 +0300 Subject: [PATCH] Make launcher.js work in Web Workers / Worklets Since WebAssembly object should be exposed to Window/Worker/Worklet according to [it's WebIDL](https://webassembly.github.io/spec/js-api/index.html#webassembly-namespace) --- runtime/src/launcher/js/launcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/launcher/js/launcher.js b/runtime/src/launcher/js/launcher.js index 9b53b760d6a..ac0567daa2d 100644 --- a/runtime/src/launcher/js/launcher.js +++ b/runtime/src/launcher/js/launcher.js @@ -19,7 +19,7 @@ let heap; let global_arguments; function isBrowser() { - return typeof window !== 'undefined'; + return typeof self !== 'undefined'; } let runtime;