You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* To save resources, the editor normally deallocates webview documents (the iframe content) that are not visible.
10290
10290
* For example, when the user collapse a view or switches to another top level activity in the sidebar, the
10291
-
* `WebviewView` itself is kept alive but the webview's underlying document is deallocated. It is recreated when
10291
+
* {@linkcode WebviewView} itself is kept alive but the webview's underlying document is deallocated. It is recreated when
10292
10292
* the view becomes visible again.
10293
10293
*
10294
-
* You can prevent this behavior by setting `retainContextWhenHidden` in the `WebviewOptions`. However this
10295
-
* increases resource usage and should be avoided wherever possible. Instead, you can use persisted state to
10296
-
* save off a webview's state so that it can be quickly recreated as needed.
10294
+
* You can prevent this behavior by setting {@linkcode WebviewOptions.retainContextWhenHidden retainContextWhenHidden} in the {@linkcode WebviewOptions}.
10295
+
* However this increases resource usage and should be avoided wherever possible. Instead, you can use
10296
+
* persisted state to save off a webview's state so that it can be quickly recreated as needed.
10297
10297
*
10298
10298
* To save off a persisted state, inside the webview call `acquireVsCodeApi().setState()` with
10299
10299
* any json serializable object. To restore the state again, call `getState()`. For example:
@@ -10316,7 +10316,7 @@ declare module 'vscode' {
10316
10316
}
10317
10317
10318
10318
/**
10319
-
* Provider for creating `WebviewView` elements.
10319
+
* Provider for creating {@linkcode WebviewView} elements.
10320
10320
*/
10321
10321
export interface WebviewViewProvider {
10322
10322
/**
@@ -10340,7 +10340,7 @@ declare module 'vscode' {
10340
10340
*
10341
10341
* Text based custom editors use a {@linkcode TextDocument} as their data model. This considerably simplifies
10342
10342
* implementing a custom editor as it allows the editor to handle many common operations such as
10343
-
* undo and backup. The provider is responsible for synchronizing text changes between the webview and the `TextDocument`.
10343
+
* undo and backup. The provider is responsible for synchronizing text changes between the webview and the {@linkcode TextDocument}.
* This is called when a user first opens a resource for a `CustomTextEditorProvider`, or if they reopen an
10351
10351
* existing editor using this `CustomTextEditorProvider`.
10352
10352
*
10353
-
*
10354
10353
* @param document Document for the resource to resolve.
10355
10354
*
10356
10355
* @param webviewPanel The webview panel used to display the editor UI for this resource.
10357
10356
*
10358
10357
* During resolve, the provider must fill in the initial html for the content webview panel and hook up all
10359
-
* the event listeners on it that it is interested in. The provider can also hold onto the `WebviewPanel` to
10358
+
* the event listeners on it that it is interested in. The provider can also hold onto the {@linkcode WebviewPanel} to
10360
10359
* use later for example in a command. See {@linkcode WebviewPanel} for additional details.
10361
10360
*
10362
10361
* @param token A cancellation token that indicates the result is no longer needed.
@@ -10404,7 +10403,7 @@ declare module 'vscode' {
10404
10403
*
10405
10404
* This is invoked by the editor when the user undoes this edit. To implement `undo`, your
10406
10405
* extension should restore the document and editor to the state they were in just before this
10407
-
* edit was added to the editor's internal edit stack by `onDidChangeCustomDocument`.
10406
+
* edit was added to the editor's internal edit stack by {@linkcode CustomEditorProvider.onDidChangeCustomDocument}.
10408
10407
*/
10409
10408
undo(): Thenable<void> | void;
10410
10409
@@ -10413,7 +10412,7 @@ declare module 'vscode' {
10413
10412
*
10414
10413
* This is invoked by the editor when the user redoes this edit. To implement `redo`, your
10415
10414
* extension should restore the document and editor to the state they were in just after this
10416
-
* edit was added to the editor's internal edit stack by `onDidChangeCustomDocument`.
10415
+
* edit was added to the editor's internal edit stack by {@linkcode CustomEditorProvider.onDidChangeCustomDocument}.
10417
10416
*/
10418
10417
redo(): Thenable<void> | void;
10419
10418
@@ -10445,7 +10444,7 @@ declare module 'vscode' {
10445
10444
/**
10446
10445
* Unique identifier for the backup.
10447
10446
*
10448
-
* This id is passed back to your extension in `openCustomDocument` when opening a custom editor from a backup.
10447
+
* This id is passed back to your extension in {@linkcode CustomReadonlyEditorProvider.openCustomDocument openCustomDocument} when opening a custom editor from a backup.
0 commit comments