Re: How to serialize Origin (Cross Document Messaging)

On Mon, 18 Aug 2008, Sunava Dutta wrote:
> 
> It seems that Firefox 3 aligns more close with HTML 5.0 here, i.e, it 
> does not return a trailing backslash. It's probably worth clarifying 
> that "Origin" as defined by HTML 5.0 is not a URI and it would be good 
> to have guidelines on how to serialize "Origin" so it can be 
> consistently used inside Javascript.

The definition of postMessage(), in step 5:

   http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting

...links to the definition of "The Unicode serialization of an origin":

   http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#unicode

...which defines the exact string that must be given in the "origin" 
attribute of the MessageEvent object.

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 18 August 2008 21:01:23 UTC