Skip to content

Commit

Permalink
Add notes on what retainContextWhileHidden does to scripts
Browse files Browse the repository at this point in the history
Fixes #48719
  • Loading branch information
mjbvz committed Apr 26, 2018
1 parent 82d97b4 commit 8f1f772
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5153,9 +5153,11 @@ declare module 'vscode' {
* Normally the webview panel's html context is created when the panel becomes visible
* and destroyed when it is is hidden. Extensions that have complex state
* or UI can set the `retainContextWhenHidden` to make VS Code keep the webview
* context around, even when the webview moves to a background tab. When
* the panel becomes visible again, the context is automatically restored
* in the exact same state it was in originally.
* context around, even when the webview moves to a background tab. When a webview using
* `retainContextWhenHidden` becomes hidden, its scripts and other dynamic content are suspended.
* When the panel becomes visible again, the context is automatically restored
* in the exact same state it was in originally. You cannot send messages to a
* hidden webview, even with `retainContextWhenHidden` enabled.
*
* `retainContextWhenHidden` has a high memory overhead and should only be used if
* your panel's context cannot be quickly saved and restored.
Expand Down

0 comments on commit 8f1f772

Please sign in to comment.