diff --git a/src/vs/base/common/worker/simpleWorker.ts b/src/vs/base/common/worker/simpleWorker.ts index 38a4fcd30ecd9d609156deb4c7c32757d417fef1..648c36a377008d6dc47dd410054de1cb3d1fd866 100644 --- a/src/vs/base/common/worker/simpleWorker.ts +++ b/src/vs/base/common/worker/simpleWorker.ts @@ -221,13 +221,13 @@ export class SimpleWorkerClient extends Disposable { // Gather loader configuration let loaderConfiguration: any = null; - let globalRequire = (window).require; + let globalRequire = (self).require; if (typeof globalRequire.getConfig === 'function') { // Get the configuration from the Monaco AMD Loader loaderConfiguration = globalRequire.getConfig(); - } else if (typeof (window).requirejs !== 'undefined') { + } else if (typeof (self).requirejs !== 'undefined') { // Get the configuration from requirejs - loaderConfiguration = (window).requirejs.s.contexts._.config; + loaderConfiguration = (self).requirejs.s.contexts._.config; } this._lazyProxy = new TPromise((c, e, p) => { diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 12757dc84e1a42eabfa5ec865d1ad8012b28b128..4d610446b43f701c62cd4bd1137f3c76c899aebf 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -100,7 +100,7 @@ class WordHighlighter { // Cancel any renderDecorationsTimer if (this.renderDecorationsTimer !== -1) { - window.clearTimeout(this.renderDecorationsTimer); + clearTimeout(this.renderDecorationsTimer); this.renderDecorationsTimer = -1; } @@ -190,7 +190,7 @@ class WordHighlighter { if (this.workerRequestCompleted && this.renderDecorationsTimer !== -1) { // case b) // Delay the firing of renderDecorationsTimer by an extra 250 ms - window.clearTimeout(this.renderDecorationsTimer); + clearTimeout(this.renderDecorationsTimer); this.renderDecorationsTimer = -1; this._beginRenderDecorations(); } @@ -226,7 +226,7 @@ class WordHighlighter { this.renderDecorations(); } else { // Asyncrhonous - this.renderDecorationsTimer = window.setTimeout(() => { + this.renderDecorationsTimer = setTimeout(() => { this.renderDecorations(); }, (minimumRenderTime - currentTime)); }