You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2025. It is now read-only.
The explainer demonstrates that somewhat complex cases are easier with this API (e.g. same-site comparisons), but for simple cases it seems this API is harder to use than the status quo.
Current:
addEventListener('message',e=>{if(e.origin==="https://example.org"){// do something}});
This API:
addEventListener('message',e=>{if(Origin.parse(e.origin).isSameOrigin(Origin.parse("https://example.org"))){// do something}});
Maybe something like
addEventListener('message',e=>{if(e.originObject.isSameOrigin("https://example.org")){// do something}});