mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 21:47:12 -05:00
Make sure we update the webview's state on setState
This commit is contained in:
@@ -190,8 +190,10 @@
|
||||
postMessage: function(msg) {
|
||||
return originalPostMessage({ command: 'onmessage', data: msg }, '*');
|
||||
},
|
||||
setState: function(state) {
|
||||
return originalPostMessage({ command: 'do-update-state', data: JSON.stringify(state) }, '*');
|
||||
setState: function(newState) {
|
||||
state = newState;
|
||||
originalPostMessage({ command: 'do-update-state', data: JSON.stringify(newState) }, '*');
|
||||
return newState;
|
||||
},
|
||||
getState: function() {
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user