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

Function element

test/unit/test-batched-json.js:26–31  ·  view source on GitHub ↗

* @param {string} src * @return {!Element}

(src)

Source from the content-addressed store, hash-verified

24 * @return {!Element}
25 */
26 function element(src) {
27 // Doesn't matter that it's amp-list. Could be anything with a src attr.
28 const el = document.createElement('AMP-LIST');
29 el.setAttribute('src', src);
30 return el;
31 }
32
33 beforeEach(() => {
34 urlReplacements = {

Callers 1

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected