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

Function resize

3p/twitter.js:97–108  ·  view source on GitHub ↗

* @param {!Element} container

(container)

Source from the content-addressed store, hash-verified

95 * @param {!Element} container
96 */
97 function resize(container) {
98 const height = container./*OK*/ offsetHeight;
99 // 0 height is always wrong and we should get another resize request
100 // later.
101 if (height == 0) {
102 return;
103 }
104 global.context.updateDimensions(
105 container./*OK*/ offsetWidth,
106 height + /* margins */ 20
107 );
108 }
109
110 /**
111 * @param {string} input

Callers 2

tweetCreatedFunction · 0.85
BentoFitTextFunction · 0.85

Calls 1

updateDimensionsMethod · 0.80

Tested by

no test coverage detected