提交 f87996af 编写于 作者: A Alex Dima

Fixes #11012: Some dependencies to window from common

上级 4726bd3d
......@@ -221,13 +221,13 @@ export class SimpleWorkerClient<T> extends Disposable {
// Gather loader configuration
let loaderConfiguration: any = null;
let globalRequire = (<any>window).require;
let globalRequire = (<any>self).require;
if (typeof globalRequire.getConfig === 'function') {
// Get the configuration from the Monaco AMD Loader
loaderConfiguration = globalRequire.getConfig();
} else if (typeof (<any>window).requirejs !== 'undefined') {
} else if (typeof (<any>self).requirejs !== 'undefined') {
// Get the configuration from requirejs
loaderConfiguration = (<any>window).requirejs.s.contexts._.config;
loaderConfiguration = (<any>self).requirejs.s.contexts._.config;
}
this._lazyProxy = new TPromise((c, e, p) => {
......
......@@ -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));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册