Interface: WebviewPanel
A panel that contains a webview.
Properties
active
readonlyactive:boolean
Whether the panel is active (focused by the user).
Source
packages/extension-api/src/extension-api.d.ts:1431
iconPath?
iconPath?:
Uri|Object
Icon for the panel shown in UI.
Source
packages/extension-api/src/extension-api.d.ts:1410
onDidChangeViewState
readonlyonDidChangeViewState:Event<WebviewPanelOnDidChangeViewStateEvent>
Fired when the panel's view state changes.
Source
packages/extension-api/src/extension-api.d.ts:1441
onDidDispose
readonlyonDidDispose:Event<void>
Fired when the panel is disposed.
This may be because the user closed the panel or because .dispose() was
called on it.
Trying to use the panel after it has been disposed throws an exception.
Source
packages/extension-api/src/extension-api.d.ts:1451
title
title:
string
Title of the panel shown in UI.
Source
packages/extension-api/src/extension-api.d.ts:1405
viewType
readonlyviewType:string
Identifies the type of the webview panel.
Source
packages/extension-api/src/extension-api.d.ts:1400
visible
readonlyvisible:boolean
Whether the panel is visible.
Source
packages/extension-api/src/extension-api.d.ts:1436
webview
readonlywebview:Webview
Webview belonging to the panel.
Source
packages/extension-api/src/extension-api.d.ts:1426
Methods
dispose()
dispose():
void
Dispose of the webview panel.
This closes the panel if it showing and disposes of the resources owned by the webview.
Webview panels are also disposed when the user closes the webview panel. Both cases
fire the onDispose event.
Returns
void
Source
packages/extension-api/src/extension-api.d.ts:1466
reveal()
reveal(
preserveFocus?):void
Show the webview panel.
Parameters
• preserveFocus?: boolean
When true, the webview will not take focus.
Returns
void