Send immediate prop update to the client via WebSocket. Queues the message for the sender coroutine to send. Args: component_id: The component ID (string or stringified dict) prop_name: The property name to update value: The new value to set
(self, component_id: str, prop_name: str, value: Any)
| 110 | outbound_queue.sync_q.put_nowait(cast(str, to_json(msg))) |
| 111 | |
| 112 | async def set_prop(self, component_id: str, prop_name: str, value: Any) -> None: |
| 113 | """Send immediate prop update to the client via WebSocket. |
| 114 | |
| 115 | Queues the message for the sender coroutine to send. |
| 116 | |
| 117 | Args: |
| 118 | component_id: The component ID (string or stringified dict) |
| 119 | prop_name: The property name to update |
| 120 | value: The new value to set |
| 121 | """ |
| 122 | msg = { |
| 123 | "type": "set_props", |
| 124 | "rendererId": self._renderer_id, |
| 125 | "payload": {"componentId": component_id, "props": {prop_name: value}}, |
| 126 | } |
| 127 | self._queue_message(msg) |
| 128 | |
| 129 | async def get_prop( |
| 130 | self, component_id: str, prop_name: str, timeout: float = 30.0 |