- From: Ryosuke Niwa <rniwa@apple.com>
- Date: Thu, 17 Oct 2013 01:04:19 -0700
- To: whatwg <whatwg@lists.whatwg.org>
On Oct 15, 2013, at 7:02 PM, Ryosuke Niwa <rniwa@apple.com> wrote: > I'm trying to make page loads on iframe always asynchronous in WebKit. However, the current specification appears to indicate that the navigation happens synchronously. > > Namely, in the following example, the first alert should be "true" as far as I read the specification. > > <script> var a = false; </script> > <iframe src="javascript:a=true" onload="a = true"></iframe> > <script> alert(a); /* or even setTimeout(function(){alert(a);},0); */ setTimeout(function(){alert(a);},10) </script> I’ll add that Firefox and Internet Explorer both load about:blank asynchronously. e.g. the first alert in <script> var a = false; </script> <iframe src=“about:blink" onload="a = true"></iframe> <script> alert(a); /* or even setTimeout(function(){alert(a);},0); */ setTimeout(function(){alert(a);},10) </script> will say “false” in both browsers whereas it says “true” on Safari and Chrome. - R. Niwa
Received on Thursday, 17 October 2013 08:04:43 UTC