jakearchibald/navigation-transitions

Should a new `reason` be added to the `navigate` event for navigations occurring from modifying `window.location`?

cvan opened this issue · 2 comments

cvan commented
Should a new `reason` be added to the `navigate` event for navigations occurring from modifying `window.location`?

Why? (not saying you're wrong, just want to know the use-case)

cvan commented

The case I'm thinking of is a form submission. In SPAs today, developers tend to preventDefault and stopPropagation on submit events, and update the document's URL with pushState (or set window.location.href or 3XX redirect).

Perhaps a reason of 'normal' satisfies this use case. I'm not sure. What are your thoughts on adding form and/or pushstate?