-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
same-document vs cross-document requests needs a clearer definition #31
Comments
Thanks for filing this! I've gotten similar feedback before, and I think this is just an issue where the concept is very clear to implementer/spec people like myself and not at all clear to web developers, so I need some help explaining it. Any navigation that would normally result in a new
Yes. The old
The concept of same-document vs. cross-document isn't supposed to capture anything app-specific. App-specific logic still needs to be programming in the app, e.g. by inspecting
If you add Other APIs that trigger navigations are:
I think this is exhaustive, but I'll get a better sense once I start working on a formal spec. |
If you could take your description here of when something is cross-document, and apply it to the definition on when Perhaps an example could be drafted on how an application may decide how to intercept cross-document requests and turn them into a same-document request (specifically by validating that it should indeed be intended for the current SPA, based on what the router supports), but I wonder if detailed examples like that should be shown in another way, like a repo of common recipes, or router-specific recipes that integrate with this API, etc. The APIs you list seem reasonable to me. Thanks for the clarification! |
I've moved the discussion about clarifying "cross-document" and "same-document" to WICG/navigation-api#3, and will close this issue as we consolidate around that repo :). Regarding examples, recipes, and framework integrations, I definitely agree we need that sort of thing. Probably we should avoid the explainer getting too long, so a separate document or maybe |
Perhaps I'm lacking some external background information on what decides whether a request is same vs cross-document, but I think this proposal could use a clear definition, as it contributes to the expectations during certain flows. Is it determined just by the nature of the request?
Some examples...
/foo
is by default a cross-document request because it normally reloads the document?navigate
event is able to know about this configuration? How?navigate
--<a>
and<form>
are described, but is that it?The text was updated successfully, but these errors were encountered: