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

Function createTemplateElement

test/unit/test-template.js:50–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 let count = 0;
49
50 function createTemplateElement() {
51 const id = ++count;
52 const type = `amp-template-${id}`;
53 const element = doc.createElement('template');
54 element.setAttribute('type', type);
55 container.appendChild(element);
56 return element;
57 }
58
59 it('should render immediately', () => {
60 const templateElement = createTemplateElement();

Callers 1

test-template.jsFile · 0.85

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected