Skip to content

onbeforenavigate redirect support #3

@atotic

Description

@atotic

"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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions