(n)
| 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…