From 51333037650ecee44191492b541106efa573cc35 Mon Sep 17 00:00:00 2001 From: madanagopaltcomcast <35588028+madanagopaltcomcast@users.noreply.github.com> Date: Wed, 12 Feb 2020 21:06:01 +0530 Subject: [PATCH] adding window object (#2218) * adding window object * Update ESMLoader.js --- examples/pxScene2d/src/rcvrcore/ESMLoader.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/pxScene2d/src/rcvrcore/ESMLoader.js b/examples/pxScene2d/src/rcvrcore/ESMLoader.js index 1e36e36903..15ab717086 100644 --- a/examples/pxScene2d/src/rcvrcore/ESMLoader.js +++ b/examples/pxScene2d/src/rcvrcore/ESMLoader.js @@ -420,8 +420,10 @@ function ESMLoader(params) { "global.Headers = Headers = global.fetch.Headers;" + "global.Request = Request = global.fetch.Request;" + "global.Response = Response = global.fetch.Response;" + - "global.WebSocket = WebSocket = require('ws');" + "global.WebSocket = WebSocket = require('ws');" + + "global.window = window = {};" ); + script.runInContext(loadCtx.contextifiedSandbox); script = null; try {