- From: Adam Barth <w3c@adambarth.com>
- Date: Wed, 19 Sep 2012 13:13:24 -0700
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: WHATWG <whatwg@whatwg.org>
On Wed, Sep 19, 2012 at 11:04 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> Why does the .origin member of URL (and presumably soon Location,
> HTMLAnchorElement etc.) return the Unicode serialization? .href,
> .hostname, all return the ASCII version of the domain name. Should we
> not just be consistent here?
My intent was to make it play nice with postMessage:
foo.postMessage("hi there", location.origin);
or
window.addEventListener("message", function(e) {
if (e.origin != location.origin)
return; // Some other origin is trying to confuse us!
...
}, false);
Does postMessage use the Unicode serialization or the ASCII serialization?
Adam
Received on Wednesday, 19 September 2012 20:14:29 UTC