MCPcopy Index your code
hub / github.com/microsoft/playwright-python / __init__

Method __init__

playwright/_impl/_cdp_session.py:28–33  ·  view source on GitHub ↗
(
        self, parent: ChannelOwner, type: str, guid: str, initializer: Dict
    )

Source from the content-addressed store, hash-verified

26 )
27
28 def __init__(
29 self, parent: ChannelOwner, type: str, guid: str, initializer: Dict
30 ) -> None:
31 super().__init__(parent, type, guid, initializer)
32 self._channel.on("event", lambda params: self._on_event(params))
33 self._channel.on("close", lambda _: self.emit(CDPSession.Events.Close, self))
34
35 def _on_event(self, params: Any) -> None:
36 self.emit(params["method"], params.get("params"))

Callers

nothing calls this directly

Calls 2

_on_eventMethod · 0.95
onMethod · 0.45

Tested by

no test coverage detected