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

Function getNavigationData

src/service/variable-source.js:146–154  ·  view source on GitHub ↗
(win, attribute)

Source from the content-addressed store, hash-verified

144 * @return {ResolverReturnDef}
145 */
146export function getNavigationData(win, attribute) {
147 const navigationInfo = win['performance'] && win['performance']['navigation'];
148 if (!navigationInfo || navigationInfo[attribute] === undefined) {
149 // PerformanceNavigation interface is not supported or attribute is not
150 // implemented.
151 return;
152 }
153 return navigationInfo[attribute];
154}
155
156/**
157 * A class to provide variable substitution related features. Extend this class

Callers 2

initializeMethod · 0.90
initializeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected