-
Notifications
You must be signed in to change notification settings - Fork 38k
Closed
Labels
apiapi-proposalon-testplanwebIssues related to running VSCode in the webIssues related to running VSCode in the web
Milestone
Description
Follow up on #72155
The current Webview.resourceRoot api proposal is problematic for a few reasons:
- It's easy to use the value incorrectly, especially when dealing with windows (or, even more fun, windows networked drives!)
- It exposes too much of the implementation detail to extensions, which means that we don't have enough freedom to change the implementation
This iteration, I'd like to revise this API proposal and be closer an idea brought up in #72155:
export interface Webview {
/** Convert a file uri to a webview uri */
toResource(resource: Uri): Thenable<Uri>;
readonly cspRoot: Thenable<string>;
}The important bits are:
- Encapsulate all the complexity of going from a file uri to a webview URI inside a function
- Add an explicit
cspRootproperty instead of trying to shoehorn this intotoResource.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
apiapi-proposalon-testplanwebIssues related to running VSCode in the webIssues related to running VSCode in the web