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

Function _ws_on_message

tests/async/test_route_web_socket.py:154–163  ·  view source on GitHub ↗
(message: Union[str, bytes])

Source from the content-addressed store, hash-verified

152 server = ws.connect_to_server()
153
154 def _ws_on_message(message: Union[str, bytes]) -> None:
155 if message == "to-respond":
156 ws.send("response")
157 return
158 if message == "to-block":
159 return
160 if message == "to-modify":
161 server.send("modified")
162 return
163 server.send(message)
164
165 ws.on_message(_ws_on_message)
166

Callers

nothing calls this directly

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected