mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
190 lines
7.2 KiB
Plaintext
190 lines
7.2 KiB
Plaintext
# Query: .innerHTML =
|
|
# Flags: CaseSensitive WordMatch
|
|
# Including: src/vs/**/*.{t,j}s
|
|
# Excluding: *.test.ts
|
|
# ContextLines: 3
|
|
|
|
22 results - 15 files
|
|
|
|
src/vs/base/browser/dom.ts:
|
|
26 // this is a workaround for innerHTML not allowing for "asymetric" accessors
|
|
27 // see https://github.com/microsoft/vscode/issues/106396#issuecomment-692625393
|
|
28 // and https://github.com/microsoft/TypeScript/issues/30024
|
|
29: node.innerHTML = value as unknown as string;
|
|
30 }
|
|
31
|
|
32 export function isInDOM(node: Node | null): boolean {
|
|
|
|
src/vs/base/browser/markdownRenderer.ts:
|
|
273 };
|
|
274
|
|
275 if (_ttpInsane) {
|
|
276: element.innerHTML = _ttpInsane.createHTML(renderedMarkdown, insaneOptions) as unknown as string;
|
|
277 } else {
|
|
278: element.innerHTML = insane(renderedMarkdown, insaneOptions);
|
|
279 }
|
|
280
|
|
281 // signal that async code blocks can be now be inserted
|
|
|
|
src/vs/base/browser/ui/contextview/contextview.ts:
|
|
157 this.shadowRootHostElement = DOM.$('.shadow-root-host');
|
|
158 this.container.appendChild(this.shadowRootHostElement);
|
|
159 this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' });
|
|
160: this.shadowRoot.innerHTML = `
|
|
161 <style>
|
|
162 ${SHADOW_ROOT_CSS}
|
|
163 </style>
|
|
|
|
src/vs/code/electron-sandbox/issue/issueReporterMain.ts:
|
|
58 const platformClass = platform.isWindows ? 'windows' : platform.isLinux ? 'linux' : 'mac';
|
|
59 document.body.classList.add(platformClass); // used by our fonts
|
|
60
|
|
61: document.body.innerHTML = BaseHtml();
|
|
62 const issueReporter = new IssueReporter(configuration);
|
|
63 issueReporter.render();
|
|
64 document.body.style.display = 'block';
|
|
|
|
src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts:
|
|
321 content.push(`.highest { color: ${styles.highlightForeground}; }`);
|
|
322 }
|
|
323
|
|
324: styleTag.innerHTML = content.join('\n');
|
|
325 if (document.head) {
|
|
326 document.head.appendChild(styleTag);
|
|
327 }
|
|
|
|
src/vs/editor/browser/core/markdownRenderer.ts:
|
|
88
|
|
89 const element = document.createElement('span');
|
|
90
|
|
91: element.innerHTML = MarkdownRenderer._ttpTokenizer
|
|
92 ? MarkdownRenderer._ttpTokenizer.createHTML(value, tokenization) as unknown as string
|
|
93 : tokenizeToString(value, tokenization);
|
|
94
|
|
|
|
src/vs/editor/browser/view/domLineBreaksComputer.ts:
|
|
107 allCharOffsets[i] = tmp[0];
|
|
108 allVisibleColumns[i] = tmp[1];
|
|
109 }
|
|
110: containerDomNode.innerHTML = sb.build();
|
|
111
|
|
112 containerDomNode.style.position = 'absolute';
|
|
113 containerDomNode.style.top = '10000';
|
|
|
|
src/vs/editor/browser/view/viewLayer.ts:
|
|
512 }
|
|
513 const lastChild = <HTMLElement>this.domNode.lastChild;
|
|
514 if (domNodeIsEmpty || !lastChild) {
|
|
515: this.domNode.innerHTML = newLinesHTML;
|
|
516 } else {
|
|
517 lastChild.insertAdjacentHTML('afterend', newLinesHTML);
|
|
518 }
|
|
|
|
530 private _finishRenderingInvalidLines(ctx: IRendererContext<T>, invalidLinesHTML: string, wasInvalid: boolean[]): void {
|
|
531 const hugeDomNode = document.createElement('div');
|
|
532
|
|
533: hugeDomNode.innerHTML = invalidLinesHTML;
|
|
534
|
|
535 for (let i = 0; i < ctx.linesLength; i++) {
|
|
536 const line = ctx.lines[i];
|
|
|
|
src/vs/editor/browser/widget/diffEditorWidget.ts:
|
|
2157
|
|
2158 let domNode = document.createElement('div');
|
|
2159 domNode.className = `view-lines line-delete ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;
|
|
2160: domNode.innerHTML = sb.build();
|
|
2161 Configuration.applyFontInfoSlow(domNode, fontInfo);
|
|
2162
|
|
2163 let marginDomNode = document.createElement('div');
|
|
2164 marginDomNode.className = 'inline-deleted-margin-view-zone';
|
|
2165: marginDomNode.innerHTML = marginHTML.join('');
|
|
2166 Configuration.applyFontInfoSlow(marginDomNode, fontInfo);
|
|
2167
|
|
2168 return {
|
|
|
|
src/vs/editor/standalone/browser/colorizer.ts:
|
|
40 let text = domNode.firstChild ? domNode.firstChild.nodeValue : '';
|
|
41 domNode.className += ' ' + theme;
|
|
42 let render = (str: string) => {
|
|
43: domNode.innerHTML = str;
|
|
44 };
|
|
45 return this.colorize(modeService, text || '', mimeType, options).then(render, (err) => console.error(err));
|
|
46 }
|
|
|
|
src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts:
|
|
232 if (!this._globalStyleElement) {
|
|
233 this._globalStyleElement = dom.createStyleSheet();
|
|
234 this._globalStyleElement.className = 'monaco-colors';
|
|
235: this._globalStyleElement.innerHTML = this._allCSS;
|
|
236 this._styleElements.push(this._globalStyleElement);
|
|
237 }
|
|
238 return Disposable.None;
|
|
|
|
241 private _registerShadowDomContainer(domNode: HTMLElement): IDisposable {
|
|
242 const styleElement = dom.createStyleSheet(domNode);
|
|
243 styleElement.className = 'monaco-colors';
|
|
244: styleElement.innerHTML = this._allCSS;
|
|
245 this._styleElements.push(styleElement);
|
|
246 return {
|
|
247 dispose: () => {
|
|
|
|
321
|
|
322 private _updateCSS(): void {
|
|
323 this._allCSS = `${this._codiconCSS}\n${this._themeCSS}`;
|
|
324: this._styleElements.forEach(styleElement => styleElement.innerHTML = this._allCSS);
|
|
325 }
|
|
326
|
|
327 public getFileIconTheme(): IFileIconTheme {
|
|
|
|
src/vs/editor/test/browser/controller/imeTester.ts:
|
|
55 let content = this._model.getModelLineContent(i);
|
|
56 r += content + '<br/>';
|
|
57 }
|
|
58: output.innerHTML = r;
|
|
59 }
|
|
60 }
|
|
61
|
|
|
|
69 let title = document.createElement('div');
|
|
70 title.className = 'title';
|
|
71
|
|
72: title.innerHTML = description + '. Type <strong>' + inputStr + '</strong>';
|
|
73 container.appendChild(title);
|
|
74
|
|
75 let startBtn = document.createElement('button');
|
|
|
|
src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts:
|
|
375 addMouseoverListeners(outputNode, outputId);
|
|
376 const content = data.content;
|
|
377 if (content.type === RenderOutputType.Html) {
|
|
378: outputNode.innerHTML = content.htmlContent;
|
|
379 cellOutputContainer.appendChild(outputNode);
|
|
380 domEval(outputNode);
|
|
381 } else if (preloadErrs.some(e => !!e)) {
|
|
|
|
src/vs/workbench/contrib/webview/browser/pre/main.js:
|
|
393 // apply default styles
|
|
394 const defaultStyles = newDocument.createElement('style');
|
|
395 defaultStyles.id = '_defaultStyles';
|
|
396: defaultStyles.innerHTML = defaultCssRules;
|
|
397 newDocument.head.prepend(defaultStyles);
|
|
398
|
|
399 applyStyles(newDocument, newDocument.body);
|
|
|
|
src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts:
|
|
280
|
|
281 const content = model.main;
|
|
282 if (!input.resource.path.endsWith('.md')) {
|
|
283: this.content.innerHTML = content;
|
|
284 this.updateSizeClasses();
|
|
285 this.decorateContent();
|
|
286 this.contentDisposables.push(this.keybindingService.onDidUpdateKeybindings(() => this.decorateContent()));
|
|
|
|
302 const innerContent = document.createElement('div');
|
|
303 innerContent.classList.add('walkThroughContent'); // only for markdown files
|
|
304 const markdown = this.expandMacros(content);
|
|
305: innerContent.innerHTML = marked(markdown, { renderer });
|
|
306 this.content.appendChild(innerContent);
|
|
307
|
|
308 model.snippets.forEach((snippet, i) => {
|