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
Summary
A new api for webview serialization has been added. This allows webviews to both save their state between becoming hidden and visible, as well as saving their state when VS Code restarts
Test
Try adding the two types of persistence to the new webview (you can use the cat coding example for this)
Visibility persistence is implemented using a getState and setState method inside the webview itself:
Visibility persistence seems to work well and is easy to implement, Serialization was more difficult to figure out but ended up getting it in the end, with some help. Updating one of the examples to use Serialization would definitely be helpful.
One thing I was expecting but didn't seem to get was persisting the state across closing the tab and reopening it with a command.
Test for #49022 #48542
Complexity: 3
Summary
A new api for webview serialization has been added. This allows webviews to both save their state between becoming hidden and visible, as well as saving their state when VS Code restarts
Test
Try adding the two types of persistence to the new webview (you can use the cat coding example for this)
Visibility persistence is implemented using a
getState
andsetState
method inside the webview itself:Serialization uses
WebviewPanelSerializer
andregisterWebviewPanelSerializer
to register a handler in the extension that can revive a webview from its state.Things to test:
The text was updated successfully, but these errors were encountered: