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

Function createResource

test/unit/test-mutator.js:107–114  ·  view source on GitHub ↗
(id, rect)

Source from the content-addressed store, hash-verified

105 }
106
107 function createResource(id, rect) {
108 const resource = new Resource(id, createElement(rect), resources);
109 resource.element['__AMP__RESOURCE'] = resource;
110 resource.state_ = ResourceState_Enum.READY_FOR_LAYOUT;
111 resource.initialLayoutBox_ = resource.layoutBox_ = rect;
112 resource.changeSize = env.sandbox.spy();
113 return resource;
114 }
115
116 it('should schedule separate requests', () => {
117 mutator.scheduleChangeSize_(

Callers 1

test-mutator.jsFile · 0.70

Calls 1

createElementFunction · 0.70

Tested by

no test coverage detected