You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, a UrlRequest is generated when the user clicks on a link. There should be a function similar to Navigation.pushUrl except that it goes through application.onUrlRequest. This way, we can delegate to application.onUrlRequest from onClick and other handlers.
Here's my use case. I wrote a wrapper around Browser.application that, given the old URL and the new, decides whether to use pushUrl or replaceUrl. That way, all the logic of handling history is collected in one place instead of scattered across the application. This works fine for links, but not for handlers where I have to do the decision locally. Worse, since the old URL is maintained in the wrapper and not in the application, I can't implement this even if I'm OK with duplicating code.
The text was updated successfully, but these errors were encountered:
Currently, a
UrlRequest
is generated when the user clicks on a link. There should be a function similar toNavigation.pushUrl
except that it goes throughapplication.onUrlRequest
. This way, we can delegate toapplication.onUrlRequest
fromonClick
and other handlers.Here's my use case. I wrote a wrapper around
Browser.application
that, given the old URL and the new, decides whether to usepushUrl
orreplaceUrl
. That way, all the logic of handling history is collected in one place instead of scattered across the application. This works fine for links, but not for handlers where I have to do the decision locally. Worse, since the old URL is maintained in the wrapper and not in the application, I can't implement this even if I'm OK with duplicating code.The text was updated successfully, but these errors were encountered: