Open a new page in the client.
(self, target: Callable | str, new_tab: bool = False)
| 305 | return AwaitableResponse(send_and_forget, send_and_wait) |
| 306 | |
| 307 | def open(self, target: Callable | str, new_tab: bool = False) -> None: |
| 308 | """Open a new page in the client.""" |
| 309 | path = target if isinstance(target, str) else self.page_routes[target] |
| 310 | self.outbox.enqueue_message('open', {'path': path, 'new_tab': new_tab}, self.id) |
| 311 | |
| 312 | def download(self, src: str | bytes, filename: str | None = None, media_type: str = '') -> None: |
| 313 | """Download a file from a given URL or raw bytes.""" |