Skip to content

Commit

Permalink
use textContent for style-elements, fyi @alexdima, #106395
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Oct 8, 2020
1 parent e47c462 commit ad1a43b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class StandaloneThemeServiceImpl extends Disposable implements IStandalon
if (!this._globalStyleElement) {
this._globalStyleElement = dom.createStyleSheet();
this._globalStyleElement.className = 'monaco-colors';
this._globalStyleElement.innerHTML = this._allCSS;
this._globalStyleElement.textContent = this._allCSS;
this._styleElements.push(this._globalStyleElement);
}
return Disposable.None;
Expand All @@ -241,7 +241,7 @@ export class StandaloneThemeServiceImpl extends Disposable implements IStandalon
private _registerShadowDomContainer(domNode: HTMLElement): IDisposable {
const styleElement = dom.createStyleSheet(domNode);
styleElement.className = 'monaco-colors';
styleElement.innerHTML = this._allCSS;
styleElement.textContent = this._allCSS;
this._styleElements.push(styleElement);
return {
dispose: () => {
Expand Down Expand Up @@ -321,7 +321,7 @@ export class StandaloneThemeServiceImpl extends Disposable implements IStandalon

private _updateCSS(): void {
this._allCSS = `${this._codiconCSS}\n${this._themeCSS}`;
this._styleElements.forEach(styleElement => styleElement.innerHTML = this._allCSS);
this._styleElements.forEach(styleElement => styleElement.textContent = this._allCSS);
}

public getFileIconTheme(): IFileIconTheme {
Expand Down

0 comments on commit ad1a43b

Please sign in to comment.