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

Function updateContainerSize

extensions/amp-iframe/1.0/component.js:92–99  ·  view source on GitHub ↗
(height, width)

Source from the content-addressed store, hash-verified

90 }, [handleSendIntersectionsPostMessage]);
91
92 const updateContainerSize = (height, width) => {
93 const container = containerRef.current;
94 if (!container) {
95 return;
96 }
97 setStyle(container, 'width', width, 'px');
98 setStyle(container, 'height', height, 'px');
99 };
100
101 const attemptResize = useCallback(() => {
102 let height = Number(dataRef.current?.height);

Callers 1

BentoIframeFunction · 0.85

Calls 1

setStyleFunction · 0.90

Tested by

no test coverage detected