Skip to content

ondecisionchange called to early #2

@janwinkler

Description

@janwinkler

the event listener for decisionchange is already called when the user changes the toggle status for a purpose and not only when the user clicks on confirm choices. this could lead to the result that tracking is already activated, although the user did not confirm the choices yet.

how to replicate:

  1. setup event listener
    navigator.dataProtectionControl.addEventListener('decisionchange', function (event)
    {
    myfunction(event.userDecisions);
    });

  2. call for consent
    navigator.dataProtectionControl.request(purposes).then(function (r) { doSomething(r); });

  3. consent window appears. now change one of the purpose toggles but do not click on confirm. the event listener will be called already

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions