-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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
}
});Metadata
Metadata
Assignees
Labels
No labels