11# Query: .innerHTML =
22# Flags: CaseSensitive WordMatch
33# Including: src/vs/**/*.{t,j}s
4- # Excluding: *.test.ts
4+ # Excluding: *.test.ts, **/test/**
55# ContextLines: 3
66
7- 22 results - 15 files
8-
9- src/vs/base/browser/dom.ts:
10- 26 // this is a workaround for innerHTML not allowing for "asymetric" accessors
11- 27 // see https://github.com/microsoft/vscode/issues/106396#issuecomment-692625393
12- 28 // and https://github.com/microsoft/TypeScript/issues/30024
13- 29: node.innerHTML = value as unknown as string;
14- 30 }
15- 31
16- 32 export function isInDOM(node: Node | null): boolean {
7+ 15 results - 11 files
178
189src/vs/base/browser/markdownRenderer.ts:
19- 273 };
20- 274
21- 275 if (_ttpInsane) {
22- 276 : element.innerHTML = _ttpInsane.createHTML(renderedMarkdown, insaneOptions) as unknown as string;
23- 277 } else {
24- 278 : element.innerHTML = insane(renderedMarkdown, insaneOptions);
25- 279 }
26- 280
27- 281 // signal that async code blocks can be now be inserted
10+ 272 };
11+ 273
12+ 274 if (_ttpInsane) {
13+ 275 : element.innerHTML = _ttpInsane.createHTML(renderedMarkdown, insaneOptions) as unknown as string;
14+ 276 } else {
15+ 277 : element.innerHTML = insane(renderedMarkdown, insaneOptions);
16+ 278 }
17+ 279
18+ 280 // signal that async code blocks can be now be inserted
2819
2920src/vs/base/browser/ui/contextview/contextview.ts:
3021 157 this.shadowRootHostElement = DOM.$('.shadow-root-host');
@@ -44,15 +35,6 @@ src/vs/code/electron-sandbox/issue/issueReporterMain.ts:
4435 63 issueReporter.render();
4536 64 document.body.style.display = 'block';
4637
47- src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts:
48- 321 content.push(`.highest { color: ${styles.highlightForeground}; }`);
49- 322 }
50- 323
51- 324: styleTag.innerHTML = content.join('\n');
52- 325 if (document.head) {
53- 326 document.head.appendChild(styleTag);
54- 327 }
55-
5638src/vs/editor/browser/core/markdownRenderer.ts:
5739 88
5840 89 const element = document.createElement('span');
@@ -80,13 +62,13 @@ src/vs/editor/browser/view/viewLayer.ts:
8062 517 lastChild.insertAdjacentHTML('afterend', newLinesHTML);
8163 518 }
8264
83- 530 private _finishRenderingInvalidLines(ctx: IRendererContext<T>, invalidLinesHTML: string, wasInvalid: boolean[]): void {
84- 531 const hugeDomNode = document.createElement('div') ;
85- 532
86- 533 : hugeDomNode.innerHTML = invalidLinesHTML;
87- 534
88- 535 for (let i = 0; i < ctx.linesLength; i++) {
89- 536 const line = ctx.lines[i];
65+ 533 if (ViewLayerRenderer._ttPolicy) {
66+ 534 invalidLinesHTML = ViewLayerRenderer._ttPolicy.createHTML(invalidLinesHTML) as unknown as string ;
67+ 535 }
68+ 536 : hugeDomNode.innerHTML = invalidLinesHTML;
69+ 537
70+ 538 for (let i = 0; i < ctx.linesLength; i++) {
71+ 539 const line = ctx.lines[i];
9072
9173src/vs/editor/browser/widget/diffEditorWidget.ts:
9274 2157
@@ -111,47 +93,14 @@ src/vs/editor/standalone/browser/colorizer.ts:
11193 45 return this.colorize(modeService, text || '', mimeType, options).then(render, (err) => console.error(err));
11294 46 }
11395
114- src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts:
115- 232 if (!this._globalStyleElement) {
116- 233 this._globalStyleElement = dom.createStyleSheet();
117- 234 this._globalStyleElement.className = 'monaco-colors';
118- 235: this._globalStyleElement.innerHTML = this._allCSS;
119- 236 this._styleElements.push(this._globalStyleElement);
120- 237 }
121- 238 return Disposable.None;
122-
123- 241 private _registerShadowDomContainer(domNode: HTMLElement): IDisposable {
124- 242 const styleElement = dom.createStyleSheet(domNode);
125- 243 styleElement.className = 'monaco-colors';
126- 244: styleElement.innerHTML = this._allCSS;
127- 245 this._styleElements.push(styleElement);
128- 246 return {
129- 247 dispose: () => {
130-
131- 321
132- 322 private _updateCSS(): void {
133- 323 this._allCSS = `${this._codiconCSS}\n${this._themeCSS}`;
134- 324: this._styleElements.forEach(styleElement => styleElement.innerHTML = this._allCSS);
135- 325 }
136- 326
137- 327 public getFileIconTheme(): IFileIconTheme {
138-
139- src/vs/editor/test/browser/controller/imeTester.ts:
140- 55 let content = this._model.getModelLineContent(i);
141- 56 r += content + '<br/>';
142- 57 }
143- 58: output.innerHTML = r;
144- 59 }
145- 60 }
146- 61
147-
148- 69 let title = document.createElement('div');
149- 70 title.className = 'title';
150- 71
151- 72: title.innerHTML = description + '. Type <strong>' + inputStr + '</strong>';
152- 73 container.appendChild(title);
153- 74
154- 75 let startBtn = document.createElement('button');
96+ src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts:
97+ 580 const element = DOM.$('div', { style });
98+ 581
99+ 582 const linesHtml = this.getRichTextLinesAsHtml(model, modelRange, colorMap);
100+ 583: element.innerHTML = linesHtml as unknown as string;
101+ 584 return element;
102+ 585 }
103+ 586
155104
156105src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts:
157106 375 addMouseoverListeners(outputNode, outputId);
@@ -162,15 +111,6 @@ src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts:
162111 380 domEval(outputNode);
163112 381 } else if (preloadErrs.some(e => !!e)) {
164113
165- src/vs/workbench/contrib/webview/browser/pre/main.js:
166- 393 // apply default styles
167- 394 const defaultStyles = newDocument.createElement('style');
168- 395 defaultStyles.id = '_defaultStyles';
169- 396: defaultStyles.innerHTML = defaultCssRules;
170- 397 newDocument.head.prepend(defaultStyles);
171- 398
172- 399 applyStyles(newDocument, newDocument.body);
173-
174114src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts:
175115 280
176116 281 const content = model.main;
0 commit comments