feat: Adding an event to go back just as the user would. (#3636)
* feat: Adding an event to go back just as the user would. * fix: Simplification suggested by masenf. * fix: And now apply the fix to the right function.
This commit is contained in:
parent
d621115f9b
commit
5071245127
@ -509,6 +509,15 @@ def console_log(message: str | Var[str]) -> EventSpec:
|
|||||||
return server_side("_console", get_fn_signature(console_log), message=message)
|
return server_side("_console", get_fn_signature(console_log), message=message)
|
||||||
|
|
||||||
|
|
||||||
|
def back() -> EventSpec:
|
||||||
|
"""Do a history.back on the browser.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
An event to go back one page.
|
||||||
|
"""
|
||||||
|
return call_script("window.history.back()")
|
||||||
|
|
||||||
|
|
||||||
def window_alert(message: str | Var[str]) -> EventSpec:
|
def window_alert(message: str | Var[str]) -> EventSpec:
|
||||||
"""Create a window alert on the browser.
|
"""Create a window alert on the browser.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user