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

Method __init__

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

Source from the content-addressed store, hash-verified

1512 Events = SimpleNamespace(Close="close", Console="console")
1513
1514 def __init__(
1515 self, parent: ChannelOwner, type: str, guid: str, initializer: Dict
1516 ) -> None:
1517 super().__init__(parent, type, guid, initializer)
1518 self._set_event_to_subscription_mapping({Worker.Events.Console: "console"})
1519 self._channel.on("close", lambda _: self._on_close())
1520 self._page: Optional[Page] = None
1521 self._context: Optional["BrowserContext"] = None
1522
1523 def __repr__(self) -> str:
1524 return f"<Worker url={self.url!r}>"

Callers

nothing calls this directly

Calls 4

_on_closeMethod · 0.95
__init__Method · 0.45
onMethod · 0.45

Tested by

no test coverage detected