On Oct 15, 2013, at 7:02 PM, Ryosuke Niwa <[email protected]> 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