The WebView example should mention that VSCode commands can be invoked by traditional HTML links in a WebView by using the "command" protocol. Maybe the catCoding.doRefactor command could be bound to a button.
I figured out that this is possible from the source for the Welcome page, and it's super useful.
It does not appear to be possible to pass parameters to these commands. If that _is_ possible, please document that too :)
Hi, can I try tackling this?
By all means!
Talking with the VS Code engineers, they discourage firing commands directly from a webview as that could allow running unsafe commands. The recommended approach is to use postMessage as documented in the tutorial.
Most helpful comment
Talking with the VS Code engineers, they discourage firing commands directly from a webview as that could allow running unsafe commands. The recommended approach is to use postMessage as documented in the tutorial.