(n)
| 180 | |
| 181 | @app.callback(Output("result", "children"), Input("btn", "n_clicks")) |
| 182 | async def read_prop(n): |
| 183 | if not n: |
| 184 | raise PreventUpdate |
| 185 | |
| 186 | from dash import ctx |
| 187 | |
| 188 | ws = ctx.websocket |
| 189 | if ws: |
| 190 | value = await ws.get_prop("source", "children") |
| 191 | return f"Read: {value}" |
| 192 | return "No WebSocket" |
| 193 | |
| 194 | dash_duo.start_server(app) |
| 195 |
nothing calls this directly
no test coverage detected
searching dependent graphs…