Major unresolved issues with or opposition to this design:
@annevk noted in the URLPattern thread linked directly above that the specific case of postMessage() validation could be satisfied with a narrower matching API that encouraged developers to think about more than the origin, which is a reasonable suggestion.
This would be, I think, the first place we'd directly expose the "same-site" concept in a way that enabled comparison.
This proposal derives a "site" from an origin (a la HTML's "obtain a site" and "same site" definitions), and exposes it as a property of that concept. It could also be reasonable to expose it through the aforementioned URLHost proposal, or more directly on a URL. IMO, none of those are mutually exclusive, and I can see reasonable arguments for several of them (URLHost, for instance, seems particularly well-suited to explain the "schemelessly same site" concept,
<!-- Content below this is maintained by @w3c-tag-bot -->
OpenedAug 5, 2025
Explainer
https://github.com/mikewest/origin-api/
The explainer
Where and by whom is the work is being done?
Feedback so far
postMessage()
validation could be satisfied with a narrower matching API that encouraged developers to think about more than the origin, which is a reasonable suggestion.You should also know that...
There's some relationship to @annevk's https://github.com/whatwg/url/pull/288, though I think that aims to solve a distinct problem.
This would be, I think, the first place we'd directly expose the "same-site" concept in a way that enabled comparison.
This proposal derives a "site" from an origin (a la HTML's "obtain a site" and "same site" definitions), and exposes it as a property of that concept. It could also be reasonable to expose it through the aforementioned
URLHost
proposal, or more directly on a URL. IMO, none of those are mutually exclusive, and I can see reasonable arguments for several of them (URLHost
, for instance, seems particularly well-suited to explain the "schemelessly same site" concept,Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1130