MCPcopy
hub / github.com/ampproject/amphtml / htmlFor

Function htmlFor

src/core/dom/static-template.js:16–23  ·  view source on GitHub ↗
(nodeOrDoc)

Source from the content-addressed store, hash-verified

14 * @return {function(readonly string[]):HTMLElement}
15 */
16export function htmlFor(nodeOrDoc) {
17 const doc = nodeOrDoc.ownerDocument || /** @type {Document} */ (nodeOrDoc);
18 if (!htmlContainer || htmlContainer.ownerDocument !== doc) {
19 htmlContainer = doc.createElement('div');
20 }
21
22 return html;
23}
24
25/**
26 * Creates the svg helper for the doc.

Calls

no outgoing calls

Tested by

no test coverage detected