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

Function getConsentPolicySharedData

src/consent.js:28–39  ·  view source on GitHub ↗
(element, policyId)

Source from the content-addressed store, hash-verified

26 * @return {!Promise<?Object>}
27 */
28export function getConsentPolicySharedData(element, policyId) {
29 return Services.consentPolicyServiceForDocOrNull(element).then(
30 (consentPolicy) => {
31 if (!consentPolicy) {
32 return null;
33 }
34 return consentPolicy.getMergedSharedData(
35 /** @type {string} */ (policyId)
36 );
37 }
38 );
39}
40
41/**
42 * @param {!Element|!ShadowRoot} element

Callers 6

layoutCallbackMethod · 0.90
initiateAdRequestMethod · 0.90
sendConsentData_Method · 0.90
initMethod · 0.90
getConsents_Method · 0.90
bindToAmpConsent_Method · 0.90

Calls 2

getMergedSharedDataMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected