UrlLauncher
UrlLauncher
#
Bases: Service
page
#
The page (of type Page
or PageView
) to which this control belongs to.
parent
#
parent: BaseControl | None
The direct ancestor(parent) of this control.
It defaults to None
and will only have a value when this control is mounted (added to the page tree).
The Page
control (which is the root of the tree) is an exception - it always has parent=None
.
before_update
#
This method is called every time when this control is being updated.
Note
Make sure not to call/request an update()
here.
build
#
Called once during control initialization to define its child controls. self.page is available in this method.
can_launch_url_async
#
Checks whether the specified URL can be handled by some app installed on the device.
PARAMETER | DESCRIPTION |
---|---|
url
|
The URL to check. |
RETURNS | DESCRIPTION |
---|---|
bool
|
|
bool
|
|
bool
|
or the application does not have permission to check. For example: |
bool
|
|
bool
|
|
launch_url
#
launch_url(
url: str | Url,
*,
web_popup_window_name: str | UrlTarget | None = None,
web_popup_window: bool = False,
web_popup_window_width: int | None = None,
web_popup_window_height: int | None = None,
) -> None
Opens a web browser or popup window to a given url
.
PARAMETER | DESCRIPTION |
---|---|
url
|
The URL to open. |
web_popup_window_name
|
Window tab/name to open URL in. |
web_popup_window
|
Whether to open the URL in a browser popup window.
TYPE:
|
web_popup_window_width
|
Popup window width.
TYPE:
|
web_popup_window_height
|
Popup window height.
TYPE:
|
launch_url_async
#
launch_url_async(
url: str | Url,
*,
web_popup_window_name: str | UrlTarget | None = None,
web_popup_window: bool = False,
web_popup_window_width: int | None = None,
web_popup_window_height: int | None = None,
) -> None
Opens a web browser or popup window to a given url
.
PARAMETER | DESCRIPTION |
---|---|
url
|
The URL to open. |
web_popup_window_name
|
Window tab/name to open URL in. |
web_popup_window
|
Whether to open the URL in a browser popup window.
TYPE:
|
web_popup_window_width
|
Popup window width.
TYPE:
|
web_popup_window_height
|
Popup window height.
TYPE:
|