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

Function cookieReader

extensions/amp-analytics/0.1/cookie-reader.js:13–18  ·  view source on GitHub ↗
(win, element, name)

Source from the content-addressed store, hash-verified

11 * @return {?string}
12 */
13export function cookieReader(win, element, name) {
14 if (!isCookieAllowed(win, element)) {
15 return null;
16 }
17 return getCookie(win, name);
18}
19
20/**
21 * Determine if cookie writing/reading feature is supported in current

Callers 1

getMacrosMethod · 0.90

Calls 2

getCookieFunction · 0.90
isCookieAllowedFunction · 0.85

Tested by

no test coverage detected