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

Method __init__

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

Source from the content-addressed store, hash-verified

88
89class Frame(ChannelOwner):
90 def __init__(
91 self, parent: ChannelOwner, type: str, guid: str, initializer: Dict
92 ) -> None:
93 super().__init__(parent, type, guid, initializer)
94 self._parent_frame = from_nullable_channel(initializer.get("parentFrame"))
95 if self._parent_frame:
96 self._parent_frame._child_frames.append(self)
97 self._name = initializer["name"]
98 self._url = initializer["url"]
99 self._detached = False
100 self._child_frames: List[Frame] = []
101 self._page: Optional[Page] = None
102 self._load_states: Set[str] = set(initializer["loadStates"])
103 self._event_emitter = EventEmitter()
104 self._channel.on(
105 "loadstate",
106 lambda params: self._on_load_state(params.get("add"), params.get("remove")),
107 )
108 self._channel.on(
109 "navigated",
110 lambda params: self._on_frame_navigated(params),
111 )
112
113 def __repr__(self) -> str:
114 return f"<Frame name={self.name} url={self.url!r}>"

Callers

nothing calls this directly

Calls 6

_on_load_stateMethod · 0.95
_on_frame_navigatedMethod · 0.95
from_nullable_channelFunction · 0.90
appendMethod · 0.80
getMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected