MCPcopy
hub / github.com/angular/angular / convertHtmlToDom

Function convertHtmlToDom

packages/platform-server/test/dom_utils.ts:76–81  ·  view source on GitHub ↗

* Converts a static HTML to a DOM structure. * * @param html the rendered html in test * @param doc the document object * @returns a div element containing a copy of the app contents

(html: string, doc: Document)

Source from the content-addressed store, hash-verified

74 * @returns a div element containing a copy of the app contents
75 */
76function convertHtmlToDom(html: string, doc: Document): HTMLElement {
77 const contents = getAppContents(html);
78 const container = doc.createElement('div');
79 container.innerHTML = contents;
80 return container;
81}
82
83/**
84 * Reset TView, so that we re-enter the first create pass as

Callers 1

insertDomInDocumentFunction · 0.85

Calls 2

getAppContentsFunction · 0.85
createElementMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…