• window.consentApi.unblock: Check if a given URL / string is blocked by a Content Blocker:

    • When a Content Blocker exists, the Promise is only resolved after given consent
    • When no Content Blocker exists, the Promise is immediate resolved

    Example (ES5):

    (window.consentApi && window.consentApi.unblock("player.vimeo.com") || Promise.resolve()).then(function() {
    console.log("Consent for Vimeo given, unlock content...!");
    });

    Example (ES6, TS):

    (window.consentApi?.unblock("player.vimeo.com") || Promise.resolve()).then(() => {
    console.log("Consent for Vimeo given, unlock content...!");
    });

    Parameters

    • blocker: BlockerDefinition[]
    • url: string
    • Optional options: HTMLElement | Options

    Returns Promise<void>