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

Method once

playwright/_impl/_sync_base.py:128–132  ·  view source on GitHub ↗

The same as ``self.on``, except that the listener is automatically removed after being called.

(self, event: Any, f: Any)

Source from the content-addressed store, hash-verified

126 self._impl_obj.on(event, self._wrap_handler(f))
127
128 def once(self, event: Any, f: Any) -> None:
129 """The same as ``self.on``, except that the listener is automatically
130 removed after being called.
131 """
132 self._impl_obj.once(event, self._wrap_handler(f))
133
134 def remove_listener(self, event: Any, f: Any) -> None:
135 """Removes the function ``f`` from ``event``."""

Callers 1

connectMethod · 0.45

Calls 1

_wrap_handlerMethod · 0.95

Tested by

no test coverage detected