JSNI is deprecated, you can use the browser state API with pushState 
<https://developer.mozilla.org/en-US/docs/Web/API/History/pushState>.
You can also check domino-history 
<https://github.com/DominoKit/domino-history> which a lightweight wrapper 
around the pushState.

On Friday, October 16, 2020 at 7:40:39 AM UTC+3 Craig Mitchell wrote:

> As Tomas said, not directly with History.  It's simple JSNI though:
>
> public static native void updateURL(String newUrl) /*-{
>     $wnd.history.pushState(newUrl, "", newUrl);
> }-*/;
>
> public static native void initialise() /*-{
> $wnd.onpopstate = $entry(function(e) {
> @com.blah.YourClass::yourMethodThatListensForUrlChange()();
> });
> }-*/;
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/b62e5e0c-3514-417e-a2d1-9253701e20efn%40googlegroups.com.

Reply via email to