-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Consider this code:
function runLoopingCase() {
cookieStore.onchange = (event) => {
printChangeEvent('Cookie got changed\n');
document.cookie="a=b";
};
document.cookie="a=b";
}
The spec says that any time a cookie is set, we should fire an event. This would mean that the above code will loop infinitely.
And indeed, on Chrome and Safari it does. A fix for this would be: "Do not fire the change event if the cookie being set is identical to an already-existing cookie". This makes logical sense and is how Mozilla fixed the issue: https://phabricator.services.mozilla.com/D217573.
Can we modify the spec to enforce that events are not fired when an identical cookie is set?
inexorabletash and charliewolfe
Metadata
Metadata
Assignees
Labels
No labels