Skip to content

Warn webview extensions that use the vscode-resource: scheme directly #81685

@mjbvz

Description

@mjbvz

Problem

The webview.asWebviewUri is now the preferred way to load local resources in webview. We really want all webviews to migrate to using this api instead of using vscode-resource uri directly. Reasons:

  • asWebviewUri (mostly) handles some tricky edge cases around network drives on windows
  • asWebviewUri makes it possible to have a webviews that can load a mix of local and remote content.
  • asWebviewUri work much better on the web

Proposal

When developing a webview extension, warn in the console if that extension tries creating a webview that looks like it uses vscode-resource instead of webview.asWebviewUri

Metadata

Metadata

Assignees

Labels

extensionsIssues concerning extensionsverification-neededVerification of issue is requestedverifiedVerification succeededwebviewWebview issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions