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

Function createOverflow

ads/vendors/csa.js:306–313  ·  view source on GitHub ↗

* Helper function to create an overflow element * @param {!Window} global The window object of the iframe * @param {!Element} container HTML element of the CSA container * @param {number} height The full height the CSA container should be when the * overflow element is clicked.

(global, container, height)

Source from the content-addressed store, hash-verified

304 * overflow element is clicked.
305 */
306function createOverflow(global, container, height) {
307 const overflow = getOverflowElement(global);
308 // When overflow is clicked, resize to full height
309 overflow.onclick = () => requestResizeInternal(global, container, height);
310 global.document.getElementById('c').appendChild(overflow);
311 // Resize the CSA container to not conflict with overflow
312 resizeCsa(container, currentAmpHeight - overflowHeight);
313}
314
315/**
316 * Helper function to create the base overflow element

Callers 2

resizeDeniedHandlerFunction · 0.85
resizeIframeFunction · 0.85

Calls 4

getOverflowElementFunction · 0.85
requestResizeInternalFunction · 0.85
resizeCsaFunction · 0.85
getElementByIdMethod · 0.45

Tested by

no test coverage detected