Skip to content

Allow subscribing to user contexts #755

Open
@Mr0grog

Description

@Mr0grog

The session.subscribe command currently lets you subscribe to an event from a particular set of browsing contexts (a.k.a. navigables) or globally, from any source. However, it seems like it might be useful to be able to subscribe to a particular user context as well.

I think this is particularly useful when it comes to script domain events that don’t belong to a browsing context (e.g. events from service workers), but which do belong to a user context (please let me know if I am fundamentally misunderstanding this). This would probably also apply to hypothetical future events from the storage domain (or some other new domain), but those are totally hypothetical right now.

Relatedly, it would also be important for all events to include a user context ID when they don’t include a browsing context ID. (It might be nicer if all always included it — see #754 for another point about making it easier to map events back to subscribed-to sources.)

Note: I only recently started working with events in BiDi, and this jumped out at me as a potential issue, not a specific use case I was trying to solve. (I am working on Selenium’s codebase, and it does not [yet] use BiDi user contexts.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions