W3C home > Mailing lists > Public > public-html@w3.org > April 2008

Re: postMessage feedback

From: Martin Atkins <mart@degeneration.co.uk>
Date: Mon, 28 Apr 2008 20:51:10 +0100
Message-ID: <48162AAE.7090306@degeneration.co.uk>
CC: HTML WG <public-html@w3.org>, "whatwg@whatwg.org" <whatwg@whatwg.org>

Jeff Walden wrote:
> Ian Hickson wrote:
>> I haven't changed the target of the event, it's still the Document 
>> object. This is a little odd, though, would people rather I made it 
>> the <body> element with an auto-forward to the Window object, like the 
>> 'load' event and so forth? That would allow onmessage="" handles to be 
>> written.
> 
> I've mentioned this on IRC but should probably mention it here so it's 
> in the record, so to speak.  I don't see a strong use case for an 
> onmessage attribute.  Event handler attributes are useful for quick 
> little things, but accepting messages from other sites seems neither 
> quick (aside from free-for-all walls I can't think of things you'd want 
> to do that wouldn't be fairly involved) nor little (you need the origin 
> check at a minimum, then you have to do whatever you're going to do, and 
> it's a lot to stuff in an attribute -- and if you're just delegating to 
> another method, why not just set the method as handler 
> programmatically?).  I don't think having to do it via script is 
> particularly burdensome.
> 

On the other hand, if there is no particular reason why it is better for 
it to be on the document object, it seems sensible to me to be 
consistent with what already exists.

(I'm not saying that there *is* no particular reason, but I don't know 
what it would be.)
Received on Monday, 28 April 2008 19:51:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:54 UTC