mattbierner / vscode-emojisense

Emoji Autocomplete Plugin For VSCode
https://marketplace.visualstudio.com/items?itemName=bierner.emojisense
MIT License
119 stars 9 forks source link

Adopt VS Code's 'asWebviewUri' API #27

Closed mjbvz closed 4 years ago

mjbvz commented 4 years ago

Hi, I maintain VS Code's Webview API

Problem

Our telemetry suggests that your extension may be loading resources using hardcoded `vscode-resource:` uris. These uris have some important limitations and also don't work properly when VS Code is run in a browser. We are also making changes in the desktop version of VS Code that may cause these uris to not work properly in VS Code 1.46+.

While we are making our best effort to support existing `vscode-resource:` uris, this extension needs to adopt the `Webview.asWebviewUri` function for loading resources and `Webview.cspSource` for content security policies. These APIs shipped around 2 years ago so they should be available in all modern versions of VS Code.

Fix

To ensure that your extension continues to work in as many environments as possible—including on web and remotely—please migrate away from hardcoding `vscode-resource:` to use these new APIs. You can find additional information about the issue here: https://github.com/microsoft/vscode/issues/97962

Let me know if you have any questions about this change

mjbvz commented 4 years ago

Testing