Fixes#173291
It's possible for the ext host to try performing an action on a webview that has been disposed but where the dispose message hasn't yet reached the ext host. We currently throw in these cases and there's nothing an extension could do to prevent this
With this change, I've removed the exception logic so these types of messages to the main thread will just noop. On the ext host side, we still throw an error if you try posting to a webview that the ext host knows for sure is disposed of. This is usually a real bug in extension code. Extensions can prevent it by checking if the webview they are holding has been disposed of before making a request to it
Fixes#146253
Two parts to this change:
- Make postMessage return false if a message cannot be delivered to a webview
- Don't queue messages for hidden (and non-retained) webviews. This was potentially causing a huge flood of messages to be dumped into the webview once it becomes visible again
* Improve passing of ArrayBuffers to and from webviews
Fixes#115807
* Serialize and restore typed arrays too
This also makes it so that if you pass the same ArrayBuffer twice in an object, we use a single object on the receiver side too
* Fix spelling
* Require VS Code 1.56+
- Move protocol types into protocol
- Hold off on combining the options objects until serialization
- Add explicit converstions instead of using `...`
- Make a few methods take property bags to help avoid passing arguments in wrong order
Fixes#114543
External and internal callers to openExternal may not expect (or want) their urls to be handled by a contributed opener. This change makes it so you have to explicitly enable using contributed openers when calling openExternal.
It also enables using contributed openers for a few places in our codebase
Fixes#105670
Previously our webview commands assumed that webviews were always going to be in an editor. This is no longer true with webview views.
To fix this, I've added an `activeWebview` to the `IWebviewService`. This tracks the currently focused webview.