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

Function disableScrollingOnIframe

src/iframe-helper.js:547–555  ·  view source on GitHub ↗
(iframe)

Source from the content-addressed store, hash-verified

545 * @return {!Element}
546 */
547export function disableScrollingOnIframe(iframe) {
548 addAttributesToElement(iframe, {'scrolling': 'no'});
549
550 // This shouldn't work, but it does on Firefox.
551 // https://stackoverflow.com/a/15494969
552 setStyle(iframe, 'overflow', 'hidden');
553
554 return iframe;
555}
556
557/**
558 * Returns true if win's properties can be accessed and win is defined.

Callers 4

layoutCallbackMethod · 0.90
layoutCallbackMethod · 0.90
layoutCallbackMethod · 0.90
layoutCallbackMethod · 0.90

Calls 2

addAttributesToElementFunction · 0.90
setStyleFunction · 0.90

Tested by

no test coverage detected