"redirect" is a common pattern. Ex: all external navigations go through "t.co"
How do you find the url user is navigating to inside onbeforenavigate handler?
Proposed API:
history.onbeforenavigate = (e) => {
e.redirect(`newUrl?from={e.url}`)
}
POST requests cannot be redirected.