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

Function createElementWithResource

test/unit/test-resources.js:1384–1390  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

1382 }
1383
1384 function createElementWithResource(id) {
1385 const element = createElement();
1386 const resource = new Resource(id, element, resources);
1387 resource.state_ = ResourceState_Enum.NOT_BUILT;
1388 resource.element['__AMP__RESOURCE'] = resource;
1389 return [element, resource];
1390 }
1391
1392 function stubBuild(resource) {
1393 const origBuild = resource.build;

Callers 1

test-resources.jsFile · 0.70

Calls 1

createElementFunction · 0.70

Tested by

no test coverage detected