-
Notifications
You must be signed in to change notification settings - Fork 759
Description
The cross-document spec currently limits transitions to Document in the same-origin. This misses a common use-case of transitions on same-site cross-origin navigations: a.example.com -> b.example.com.
Since there is a security boundary between each origin, and transitions require sending the captured element data from the old Document to the new Document, this can't be done by default. But it should be feasible if both Documents opt-in to transitions from each other.
The above can likely be added to the @view-transition rule using 2 descriptors: from/to. Where the descriptor provides the URLs for Documents which it permits transitions from or to. The default value (same-origin?) would limit to only same-origin URLs. Something like on a.example.com:
/* Applies to all same-origin navigations */
@view-transition {
navigation: auto;
}
@view-transition {
navigation: auto;
from: url-pattern("https://b.example.com/*");
}The idea of from/to was discussed on #8925 and this is a good use-case which needs it.
We can also add a keyword like same-site to opt-in to transitions from/to any same-site URL.