-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify session.subscribe
and session.unsubscribe
#628
base: main
Are you sure you want to change the base?
Conversation
events: [*text], | ||
? contexts: [*browsingContext.BrowsingContext], | ||
events: [+text], | ||
? contexts: [+browsingContext.BrowsingContext], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we encounter events: []
or contexts: []
we should throw errors. Will add WPT tests for these cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For session subscribe/unsubscribe, the update the event map
algorithm is already making sure to skip duplicated events and contexts. It also has additional logic to deal with the fact that we only subscribe to top level context.
So I don't think we have to switch to sets to skip duplicates. Since it adds some complexity, maybe we should reconsider this?
2f5ba1a
to
025cc47
Compare
Closes #617.
Preview | Diff