- changed status to resolved
Avoid using hardcoded `vscode-resource` in the URIs when referencing scripts or images
Issue #443
resolved
Those URIs work fine for electron, but don’t work properly when the VS Code is running in the browser.
We also faced some issues related to `vscode-resource` and CSP when tried to run the extension in Che-Theia
To ensure that the extension will work in any environment, it’s necessary to:
- use the Webview.asWebviewUri function for loading resources
- use the Webview.cspSource property in content security policies
Those APIs shipped around a year ago so should be available in modern versions of VS Code .
The additional information about the change could be found here https://github.com/microsoft/vscode/issues/97962
The release notes with the description of those APIs https://code.visualstudio.com/updates/v1_38#_webviewaswebviewuri-and-webviewcspsource
Comments (2)
-
Account Deactivated -
reporter Thanks for fixing that.
- Log in to comment
@Vitaliy Gulyy We released version 2.6.4 today which removes the hardcoded resource scheme.
If there are other issues when running in Theia, please add a comment in https://bitbucket.org/atlassianlabs/atlascode/issues/303/make-atlascode-compatible-for-theia