On Thu, Dec 8, 2011 at 1:28 AM, Peter van der Zee <[email protected]> wrote:
> Even though your script should run synchronous, it might not. The
> callback might have actually fired before your script got a chance to
> intercept it. I remember IE could prematurely fire the onload event
> for an image in primed cache if you set the .src before setting the
> .onload. Maybe the same is the case here. Especially since you're
> adding it to the dom like that, behavior might not be what you expect.
>
> Does the "onload" (/whatever) even fire for inline scripts?
>

The "onload" event does only fire for external scripts, those scripts
having a "src" attribute, thus:

   <script src="dataURI"></script>

will also fire the "onload" event in all recent browsers handling the data URI.

The script will be considered external since it has the "src" attribute.

Not sure it is "very useful", however this is the tested behaviour.

--
Diego


> Try a different approach?
>
> - peter
>
> --
> To view archived discussions from the original JSMentors Mailman list: 
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here: 
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to