[whatwg] Request: window.postMessage should be async


Thanks for the reply.

I see window.postMessage as different from element.dispatchEvent.  The JS
author has control over the JS code executed as a result of their
dispatchEvent call.  JS author does not have control over code executed by
window.postMessage (either before and after, or during the call).
- I know what the JS stack looks like before my dispatchEvent call, but with
postMessage the JS stack exhaustion threat exists (as mentioned in my
previous email).

- With dispatchEvent, I control what the event handler code does.  With
window.postMessage I may wait for an indeterminate amount of time for that
other frame's code to complete.

These issues (and the ones mentioned in my previous email) go away if
postMessage is made async.


On Fri, Apr 4, 2008 at 2:39 PM, Anne van Kesteren <annevk at opera.com> wrote:

> On Fri, 04 Apr 2008 23:04:30 +0200, Eric Seidel <eric at webkit.org> wrote:
> > Anyway, I'm not the foremost expert here, but I was reading HTML5 last
> > week and encountered this sync postMessage() requirement, which seemed like
> > a bad idea.
> >
> It doesn't make sense to change this given that all synthesized event
> dispatching is synchronous. I don't think postMessage() should be different.
> --
> Anne van Kesteren
> <http://annevankesteren.nl/>
> <http://www.opera.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080404/0a297b0a/attachment.htm>

Received on Friday, 4 April 2008 15:09:05 UTC