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

Function getNavigationTiming

ads/google/a4a/utils.js:111–118  ·  view source on GitHub ↗

* Returns the value of some navigation timing parameter. * Feature detection is used for safety on browsers that do not support the * performance API. * @param {!Window} win * @param {string} timingEvent The name of the timing event, e.g. * 'navigationStart' or 'domContentLoadEventStart'.

(win, timingEvent)

Source from the content-addressed store, hash-verified

109 * @return {number}
110 */
111function getNavigationTiming(win, timingEvent) {
112 return (
113 (win['performance'] &&
114 win['performance']['timing'] &&
115 win['performance']['timing'][timingEvent]) ||
116 0
117 );
118}
119
120/**
121 * Check whether Google Ads supports the A4A rendering pathway is valid for the

Callers 2

googlePageParametersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected