Skip to content

CookieChangeEvent vs. promise resolve - what's the correct order? #240

Open
@bakulf

Description

@bakulf
cookieStore.onchange = () => console.log("CHANGE");
await cookieStore.set('cookie-name', 'cookie-value');
console.log("RESOLVED");

What's the correct sequence of console log messages? The spec needs to be clarified. On Chrome, sometimes you see CHANGE+RESOLVED, and sometimes RESOLVED+CHANGE, which is confusing for developers.

In Firefox, the promise is always resolved before dispatching the CookieChangeEvent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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