mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
Use URLSearchParams
This commit is contained in:
parent
17900ce21b
commit
967b65e01f
|
@ -447,10 +447,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
|
|||
params.purpose = options.purpose;
|
||||
}
|
||||
|
||||
const queryString = (Object.keys(params) as Array<keyof typeof params>)
|
||||
.map((key) => `${key}=${encodeURIComponent(params[key]!)}`)
|
||||
.join('&');
|
||||
|
||||
const queryString = new URLSearchParams(params).toString();
|
||||
this.element!.setAttribute('src', `${this.webviewContentEndpoint}/index.html?${queryString}`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue