[whatwg] Request: window.postMessage should be async

Eric Seidel eric at webkit.org
Fri Apr 4 15:09:05 PDT 2008


Anne-

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.

-eric


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-0001.htm>


More information about the whatwg mailing list