MCPcopy Index your code
hub / github.com/ampproject/amphtml / installPolyfillsInChildWindow

Function installPolyfillsInChildWindow

src/friendly-iframe-embed.js:686–698  ·  view source on GitHub ↗

* Install polyfills in the child window (friendly iframe). * @param {!Window} parentWin * @param {!Window} childWin

(parentWin, childWin)

Source from the content-addressed store, hash-verified

684 * @param {!Window} childWin
685 */
686function installPolyfillsInChildWindow(parentWin, childWin) {
687 if (!mode.isEsm()) {
688 installDocContains(childWin);
689 installCustomElements(childWin, class {});
690 }
691 // The anonymous class parameter allows us to detect native classes vs
692 // transpiled classes.
693 if (!IS_SXG) {
694 installIntersectionObserver(parentWin, childWin);
695 installResizeObserver(parentWin, childWin);
696 installAbortController(childWin);
697 }
698}
699
700/**
701 * Static installers that can be easily stubbed for tests.

Callers 1

Calls 1

installResizeObserverFunction · 0.85

Tested by

no test coverage detected