This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section: http://www.whatwg.org/specs/web-apps/current-work/#posting-messages Comment: Shouldn't postMessage throw SYNTAX_ERR when targetOrigin is a relative URL (e.g. '/')? [sp] Posted from: 88.131.66.80
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Rejected Change Description: no spec change Rationale: It does, except for "/". Allowing "/" is useful in that it allows same-origin scripts to communicate without them having to construct their origin string. (It probably wouldn't take much to convince me otherwise. If there's a reason to disallow "/" as well, please do reopen the bug.)
Ok. It would be useful to have a note about the value "/", though.
...and the value "" (which sometimes throws and sometimes not, depending on the document's URL).
Maybe we should instead make "/" a special value just like "*" is instead of actually resolving anything. As a side effect that would also enable messages between a top-level data URL that embeds another data URL I think.
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: see diff given below Rationale: Anne's idea is a good idea.
Checked in as WHATWG revision r4720. Check-in comment: Change postMessage()'s targetOrigin argument to not actually resolve but to just treat '/' specially. This will mean that targetOrigin can no longer be in the form '//example.com/' and can no longer be the empty string. http://html5.org/tools/web-apps-tracker?from=4719&to=4720
The spec has changed in a way that affects the change above. See bug 10211.