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

Function init

3p/integration-lib.js:98–108  ·  view source on GitHub ↗
(win)

Source from the content-addressed store, hash-verified

96 * @param {!Window} win
97 */
98export function init(win) {
99 initLogConstructor();
100 const config = getAmpConfig();
101
102 // Overriding to short-circuit src/mode#getMode()
103 win.__AMP_MODE = config.mode;
104
105 setReportError(console.error.bind(console));
106
107 setExperimentToggles(config.experimentToggles);
108}
109
110/**
111 * Visible for testing.

Callers 15

integration.jsFile · 0.90
myoffrz.jsFile · 0.90
tagon.jsFile · 0.90
adop.jsFile · 0.90
sunmedia.jsFile · 0.90
adreactor.jsFile · 0.90
fusion.jsFile · 0.90
aduptech.jsFile · 0.90
yektanet.jsFile · 0.90
rubicon.jsFile · 0.90
kixer.jsFile · 0.90

Calls 4

initLogConstructorFunction · 0.90
getAmpConfigFunction · 0.90
setReportErrorFunction · 0.90
setExperimentTogglesFunction · 0.90

Tested by

no test coverage detected