|
@@ -11,8 +11,12 @@ def open(target: Union[Callable[..., Any], str], new_tab: bool = False) -> None:
|
|
Note that *all* clients (i.e. browsers) connected to the page will open the target URL *unless* a socket is specified.
|
|
Note that *all* clients (i.e. browsers) connected to the page will open the target URL *unless* a socket is specified.
|
|
User events like button clicks provide such a socket.
|
|
User events like button clicks provide such a socket.
|
|
|
|
|
|
|
|
+ When using the `new_tab` parameter, the browser might block the new tab.
|
|
|
|
+ This is a browser setting and cannot be changed by the application.
|
|
|
|
+ You might want to use `ui.link` and its `new_tab` parameter instead.
|
|
|
|
+
|
|
:param target: page function or string that is a an absolute URL or relative path from base URL
|
|
:param target: page function or string that is a an absolute URL or relative path from base URL
|
|
- :param new_tab: whether to open the target in a new tab
|
|
|
|
|
|
+ :param new_tab: whether to open the target in a new tab (might be blocked by the browser)
|
|
"""
|
|
"""
|
|
path = target if isinstance(target, str) else globals.page_routes[target]
|
|
path = target if isinstance(target, str) else globals.page_routes[target]
|
|
client = globals.get_client()
|
|
client = globals.get_client()
|