Clairify docs on WebviewViewResolveContext

Fixes #105874
This commit is contained in:
Matt Bierner 2020-09-01 14:00:00 -07:00
parent d6cfcda1d8
commit bf7597ee78

View file

@ -2092,8 +2092,10 @@ declare module 'vscode' {
/**
* Persisted state from the webview content.
*
* To save resources, VS Code normally deallocates webview views that are not visible. For example, if the user
* collapse a view or switching to another top level activity, the underlying webview document is deallocates.
* To save resources, VS Code normally deallocates webview documents (the iframe content) that are not visible.
* For example, when the user collapse a view or switches to another top level activity in the sidebar, the
* `WebviewView` itself is kept alive but the webview's underlying document is deallocated. It is recreated when
* the view becomes visible again.
*
* You can prevent this behavior by setting `retainContextWhenHidden` in the `WebviewOptions`. However this
* increases resource usage and should be avoided wherever possible. Instead, you can use persisted state to