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

Function getOverflowElement

ads/vendors/csa.js:320–331  ·  view source on GitHub ↗

* Helper function to create the base overflow element * @param {!Window} global The window object of the iframe * @return {!Element}

(global)

Source from the content-addressed store, hash-verified

318 * @return {!Element}
319 */
320function getOverflowElement(global) {
321 const overflow = global.document.createElement('div');
322 overflow.id = 'overflow';
323 setStyles(overflow, {
324 position: 'absolute',
325 height: overflowHeight + 'px',
326 width: '100%',
327 });
328 overflow.appendChild(getOverflowLine(global));
329 overflow.appendChild(getOverflowChevron(global));
330 return overflow;
331}
332
333/**
334 * Helper function to create a line element for the overflow element

Callers 1

createOverflowFunction · 0.85

Calls 3

setStylesFunction · 0.90
getOverflowLineFunction · 0.85
getOverflowChevronFunction · 0.85

Tested by

no test coverage detected