當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript dom.domContentLoaded函數代碼示例

本文整理匯總了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));
			});
		});
開發者ID:joelday,項目名稱:vscode,代碼行數:35,代碼來源:main.ts

示例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();
		});
	}
開發者ID:joelday,項目名稱:vscode,代碼行數:23,代碼來源:nodeless.main.ts


注:本文中的vs/base/browser/dom.domContentLoaded函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。