Skip to content

Add support for retrieving an event class by it's CDP method name #23

Open
@ziadkh0

Description

@ziadkh0

While trying to use trio-chrome-devtools-protocol, I encountered the need to dynamically retrieve an event class by it's CDP method name in order to wait_for() it or listen() to it

Is it possible to add support for that use case?

Maybe something like cdp.utils.get_event_class():

def get_event_class(method: str) -> typing.Any:
    return _event_parsers[method]

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