Re: script execution corner case: timing of running a script created from a javascript: URL inside an IFRAME

On Jan 19, 2011, at 10:04 AM, Ojan Vafai wrote:

> On Tue, Jan 18, 2011 at 10:09 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Does it even make sense to try to standardise the behaviour here?
> 
> Imo, yes.  At least the sync-vs-async thing for javascript: could use standardizing.
> 
> I agree.
> 
> I believe WebKit is sync for javascript, data and empty URLs. Being sync for these cases is so much more convenient for web developers that have to deal with iframes. Especially as we are starting to add APIs for using iframes in lighter-weight contexts (e.g. seamless), this will become more important.

We're not sync for data: URLs currently. 

> Are there any disadvantages to making these cases sync?

For data:, there would be a disadvantage. data: content could be large, and the HTML parsing time may be significant. The HTML parser in WebKit knows how to yield periodically when parsing a large document to avoid starving event processing, but a synchronous load requirement would defeat that.

Regards,
Maciej

Received on Wednesday, 19 January 2011 19:06:49 UTC