本文整理汇总了TypeScript中vs/base/browser/dom.domContentLoaded函数的典型用法代码示例。如果您正苦于以下问题:TypeScript domContentLoaded函数的具体用法?TypeScript domContentLoaded怎么用?TypeScript domContentLoaded使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了domContentLoaded函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: domContentLoaded
return this.initServices().then(services => {
return domContentLoaded().then(() => {
mark('willStartWorkbench');
// Create Workbench
this.workbench = new Workbench(document.body, services.serviceCollection, services.logService);
// Layout
this._register(addDisposableListener(window, EventType.RESIZE, e => this.onWindowResize(e, true)));
// Workbench Lifecycle
this._register(this.workbench.onShutdown(() => this.dispose()));
this._register(this.workbench.onWillShutdown(event => event.join(services.storageService.close())));
// Startup
const instantiationService = this.workbench.startup();
// Window
this._register(instantiationService.createInstance(ElectronWindow));
// Driver
if (this.configuration.driver) {
instantiationService.invokeFunction(accessor => registerWindowDriver(accessor).then(disposable => this._register(disposable)));
}
// Config Exporter
if (this.configuration['export-default-configuration']) {
instantiationService.createInstance(DefaultConfigurationExportHelper);
}
// Logging
services.logService.trace('workbench configuration', JSON.stringify(this.configuration));
});
});
示例2: open
open(): Promise<void> {
const services = this.initServices();
return domContentLoaded().then(() => {
mark('willStartWorkbench');
// Create Workbench
this.workbench = new Workbench(
document.body,
services.serviceCollection,
services.logService
);
// Layout
this._register(addDisposableListener(window, EventType.RESIZE, () => this.workbench.layout()));
// Workbench Lifecycle
this._register(this.workbench.onShutdown(() => this.dispose()));
// Startup
this.workbench.startup();
});
}