[whatwg] using postMessage() to send to a newly-created window

On Tue, 6 Apr 2010, Dirk Pranke wrote:
> 
> How about putting some text at the end of Section 9.2.3, "Posting 
> Messages" that says something like:
> 
> "Note that messages are not guaranteed to be delivered reliably under 
> all circumstances. User agents are allowed to not deliver messages if 
> the details of their implementation may make this difficult or 
> impossible to do safely and securely. For example, if a new child window 
> is created and then a message is immediately posted to it, that message 
> may not get delivered, even if the child window belongs to the same 
> origin. A rationale for this may me that it would require the user agent 
> to queue the message across creation of a new event loop, leading to all 
> sorts of unpredictable timing issues."
> 
> I'm not particularly happy with the wording here, but it gets the point 
> across. Of course, putting in text like this would naturally lead the 
> reader to wonder under what conditions messages *are* guaranteed to be 
> delivered reliably. Which is, I think, a valid question I don't know the 
> answer to. Is it safe to say that messages are delivered reliably if the 
> destination window belongs to the specified targetOrigin and the 
> destination window is fully loaded? What if a navigation event is 
> triggered on the destination window?

I've added a note explaining the problem, but it doesn't say what the
above note says. This has nothing to do with UA limitations -- it's 
inherent in the platform.

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

Received on Wednesday, 28 July 2010 15:18:51 UTC