Module "frontend-packages/cookie-consent-web-client/src/api/createApi"
Functions
createApi
- createApi(manager: CookieConsentManager, blocker: Parameters<typeof unblock>[0]): { wrapFn: apiWrapFn }
-
Parameters
-
-
blocker: Parameters<typeof unblock>[0]
Returns { wrapFn: apiWrapFn }
Create the API functions and make them available through
window.consentApi
.There is also a stub implementation:
((a,b)=>{a[b]||(a[b]={},["consentSync"].forEach(c=>a[b][c]=()=>({cookie:null,consentGiven:!1,cookieOptIn:!0})),["consent","consentAll","unblock"].forEach(c=>a[b][c]=(...d)=>new Promise(e=>a.addEventListener(b,()=>{a[b][c](...d).then(e)},{once:!0}))))})(window,"consentApi");