MCPcopy Create free account
hub / github.com/ampproject/amphtml / setHtmlForTemplate

Method setHtmlForTemplate

src/service/template-impl.js:64–68  ·  view source on GitHub ↗

* Inserts the specified template element. * @param {!Element} templateElement * @param {string} html * @return {!Promise<(!Element|!Array<!Element>)>}

(templateElement, html)

Source from the content-addressed store, hash-verified

62 * @return {!Promise<(!Element|!Array<!Element>)>}
63 */
64 setHtmlForTemplate(templateElement, html) {
65 return this.getImplementation_(templateElement).then((impl) => {
66 return this.setHtml_(impl, html);
67 });
68 }
69
70 /**
71 * Renders the specified template element using the supplied data.

Callers 1

Calls 3

getImplementation_Method · 0.95
setHtml_Method · 0.95
thenMethod · 0.45

Tested by

no test coverage detected