From 8e7cf160d6ec329ece5978d3f92fd026b604911e Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 3 Nov 2018 22:18:36 +0000 Subject: [PATCH] Set window._ground to the most recent Ground instance, in the browser --- packages/core/src/ground.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/ground.js b/packages/core/src/ground.js index 5997116..f5ae8c0 100644 --- a/packages/core/src/ground.js +++ b/packages/core/src/ground.js @@ -10,6 +10,9 @@ function Ground(bootProc) { this.dataspace = new Dataspace(this, bootProc); this.stopHandlers = []; this.backgroundTaskCount = 0; + if (typeof window !== 'undefined') { + window._ground = this; + } } Ground._resolved = Promise.resolve();