feat: add userContext to protocol events#1046
Conversation
Since the spec added the ability to subscribe to events using user context IDs, it becomes more difficult to link a given event handler with the user context its event is initiated from. This change makes the event parameters more ergonomic and able to make that link easier to process. Fixes #1032.
|
@jimevans, I think it looks good. But I wanted to check one thing before I approve. I've noticed that |
|
@lutien It was purely an oversight. I've fixed it in a subsequent commit. Thanks for catching it. |
|
I’m wondering what the best way is to ship this to users. With Do you consider this addition critical enough to justify that disruption, or should we take a more gradual approach? Or am I being overly cautious about landing this change? |
|
@whimboo Since a client already has to be able to handle additional values in command responses and events (both are marked as From the WPT angle, it seems like this is exactly the kind of thing that those tests are intended to enforce, that implementations are compliant with the spec, so I'm fine with WPT test failures (I already have a PR for those), especially if they act as a forcing function for implementations to update themselves. But these are just my opinions, and they're not strongly held. |
|
@jimevans in this case we extend the params of the individual events and for those I cannot see that https://w3c.github.io/webdriver-bidi/#cddl-type-browsingcontextnavigationinfo |
|
@whimboo if your concern is that with the merge all the implementations become invalid, we can mark CDDL property as an optional for a month, which would give us time to implement without breaking the protocol rolls, and make the field required afterwards. I don't think its that complicated and it should work. WDYT? |
I think that would be a compromise, yes. Then browsers supporting events need to be updated first. CC'ing @lauromoura regarding the Webkit implementation that we don't want to break as well. |
While we still have some open issues regarding proper user context support, the changes related to this PR should be fine. Thanks for the heads-up. |
|
Thanks @lauromoura. In that case lets go ahead and add the |
|
@whimboo I've now made all of the additions of |
|
On #1071 the |
SHA: fdf90f8 Reason: push, by whimboo Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
@jimevans when updating the BiDi support sheet I noticed that we do not have the |
|
|
Ah you are right. I missed to check those sub types. So yes, it looks all good in that sense and ignoring |
There is actually web-platform-tests/wpt#56744 for it. |
Since the spec added the ability to subscribe to events using user context IDs, it becomes more difficult to link a given event handler with the user context its event is initiated from. This change makes the event parameters more ergonomic and able to make that link easier to process.
Fixes #1032.
Preview | Diff