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


TypeScript window.onDidDeleteWebView方法代碼示例

本文整理匯總了TypeScript中wing.window.onDidDeleteWebView方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript window.onDidDeleteWebView方法的具體用法?TypeScript window.onDidDeleteWebView怎麽用?TypeScript window.onDidDeleteWebView使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在wing.window的用法示例。


在下文中一共展示了window.onDidDeleteWebView方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: activate

export function activate(context: wing.ExtensionContext) {
	console.log('activate');

	let html = wing.Uri.file(path.join(context.extensionPath, 'web/index.html'));

	wing.window.webviews.forEach(webview => {
		webviewAdded(webview);
	});

	wing.window.onDidCreateWebView((webview) => {
		webviewAdded(webview);
	});

	wing.window.onDidDeleteWebView((webview) => {
		webviewRemoved(webview);
	});

	// wing.commands.registerCommand('extension.previewWebView', () => {
	// 	previewWebView(html);
	// });
	// hello
	wing.commands.registerCommand('extension.showNewTsClassPopup', () => {
		showWebViewPopup(html);
	});
}
開發者ID:Gt-Lab,項目名稱:gtlab-wing-extensions,代碼行數:25,代碼來源:extension.ts

示例2: activate

export function activate(context: wing.ExtensionContext) {
	let html = wing.Uri.file(path.join(context.extensionPath, 'web/index.html'));

	wing.window.webviews.forEach(webview => {
		webviewAdded(webview);
	});

	wing.window.onDidCreateWebView((webview) => {
		webviewAdded(webview);
	});

	wing.window.onDidDeleteWebView((webview) => {
		webviewRemoved(webview);
	});

	wing.commands.registerCommand('extension.newUiStoryboard', () => {
		previewWebView(html);
	});
	wing.commands.registerCommand('extension.showWebViewPopup', () => {
		showWebViewPopup(html);
	});
}
開發者ID:Gt-Lab,項目名稱:gtlab-wing-extensions,代碼行數:22,代碼來源:extension.ts

示例3: activate

export function activate(context: wing.ExtensionContext) {
	let html = wing.Uri.file(path.join(context.extensionPath, 'web/index.html'));
	
	wing.window.webviews.forEach(webview => {
		webviewAdded(webview);
	});

	wing.window.onDidCreateWebView((webview) => {
		webviewAdded(webview);
	});

	wing.window.onDidDeleteWebView((webview) => {
		webviewRemoved(webview);
	});

	wing.commands.registerCommand('extension.previewWebView', () => {
		previewWebView(html);
	});
	wing.commands.registerCommand('extension.showWebViewPopup', () => {
		showWebViewPopup(html);
	});
	
	
	wing.window.onDidChangeActiveTextEditor((texteditor) => {
		// console.log('onDidChangeActiveTextEditor');
		// previewWebView(html);
		
		showFileName(context);
	});
	showFileName(context);
	
	// wing.workspace.onDidChangeTextDocument((event)=>{
	// 	wing.window.showInformationMessage('wing.workspace.onDidChangeTextDocument');
	// });
	
	
}
開發者ID:Gt-Lab,項目名稱:gtlab-wing-extensions,代碼行數:37,代碼來源:extension.ts

示例4: activate

export function activate(context: wing.ExtensionContext) {
	// console.log('activate');
	// wing.window.showInformationMessage('activate');
	
	let html = wing.Uri.file(path.join(context.extensionPath, 'web/index.html'));

	wing.window.webviews.forEach(webview => {
		webviewAdded(webview);
	});

	wing.window.onDidCreateWebView((webview) => {
		webviewAdded(webview);
	});

	wing.window.onDidDeleteWebView((webview) => {
		webviewRemoved(webview);
	});

	wing.commands.registerCommand('extension.gtlab.wingPsMaster.show', () => {
		previewWebView(html);
	});
	// wing.commands.registerCommand('extension.showWebViewPopup', () => {
	// 	showWebViewPopup(html);
	// });
	
	
	
	// // workspace
	// wing.workspace.onDidChangeTextDocument((e: any) => {
	// 	wing.window.showInformationMessage('onDidChangeTextDocument');
	// });
	
	// wing.workspace.onDidOpenTextDocument((e: any) => {
	// 	wing.window.showInformationMessage('onDidOpenTextDocument');
	// });
	
	
	
	// // window
	// wing.window.onDidChangeTextEditorOptions((e:any) => {
	// 	wing.window.showInformationMessage('onDidChangeTextEditorOptions');
	// });
	
	// wing.window.onDidChangeTextEditorSelection((e:any)=>{
	// 	wing.window.showInformationMessage('onDidChangeTextEditorSelection');
	// });
	
	// wing.window.onDidChangeTextEditorViewColumn((e:any)=>{
	// 	wing.window.showInformationMessage('onDidChangeTextEditorViewColumn');
	// });
	
	
	
	
	// wing.window.onDidChangeActiveTextEditor((texteditor) => {
	// 	wing.window.showInformationMessage('onDidChangeActiveTextEditor');
	// 	// console.log('onDidChangeActiveTextEditor');
	// 	// previewWebView(html);
		
	// 	// showFileName(context);
	// });
	// // showFileName(context);
	
	// wing.window.showInformationMessage('setInterval');
	// setInterval( function () {
	// 	showFileName(context)
	// }, 2000);
}
開發者ID:Gt-Lab,項目名稱:gtlab-wing-extensions,代碼行數:68,代碼來源:extension.ts


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