mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
avoid innerHTML in context view, https://github.com/microsoft/vscode/issues/106395
This commit is contained in:
parent
04b92758fa
commit
c2c3177b21
|
@ -157,11 +157,9 @@ export class ContextView extends Disposable {
|
|||
this.shadowRootHostElement = DOM.$('.shadow-root-host');
|
||||
this.container.appendChild(this.shadowRootHostElement);
|
||||
this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' });
|
||||
this.shadowRoot.innerHTML = `
|
||||
<style>
|
||||
${SHADOW_ROOT_CSS}
|
||||
</style>
|
||||
`;
|
||||
const style = document.createElement('style');
|
||||
style.textContent = SHADOW_ROOT_CSS;
|
||||
this.shadowRoot.appendChild(style);
|
||||
this.shadowRoot.appendChild(this.view);
|
||||
this.shadowRoot.appendChild(DOM.$('slot'));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue