Need support for History API as JsCommands

9 переглядів
Перейти до першого непрочитаного повідомлення

Shabab Karim

не прочитано,
24 трав. 2021 р., 10:52:0724.05.21
Кому: Lift
Hi,

I see support for page redirection(JsCommands#RedirectTo) and page reload(JsCommands#Reload). The inverse of page redirection(JsCommands#RedirectTo), something like JsCommands#RedirectBack will be very helpful. 

A possible use case is having a button on a form with a back button. At this point I am needing to bind a JsExp callback to the onclick event for the button or tell the user to use the browser back button.

The browser native History API can be used for achieving this feature.

Thanks,
Shabab Karim

Antonio Salazar Cardozo

не прочитано,
24 трав. 2021 р., 10:57:2024.05.21
Кому: Lift
You can achieve this directly using `JsRaw`: `JsRaw("window.history.back()").cmd`. You can also convert your JsExp directly to a JsCmd using `.cmd` on it, which should make it usable anywhere you'd use `RedirectTo` or `Reload`.
Thanks,
Antonio

Відповісти всім
Відповісти автору
Переслати
0 нових повідомлень