MCPcopy Index your code
hub / github.com/plotly/dash / set_via_ws

Function set_via_ws

tests/websocket/test_ws_props.py:216–226  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

214
215 @app.callback(Output("result", "children"), Input("btn", "n_clicks"))
216 async def set_via_ws(n):
217 if not n:
218 raise PreventUpdate
219
220 from dash import ctx
221
222 ws = ctx.websocket
223 if ws:
224 await ws.set_prop("target", "children", f"Set via WebSocket {n}")
225 return "Set complete"
226 return "No WebSocket"
227
228 dash_duo.start_server(app)
229

Callers

nothing calls this directly

Calls 1

set_propMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…