This project is archived and is in readonly mode.

#1003 ✓resolved
Aaron Newton

load event fires immediately for scripts

Reported by Aaron Newton | September 14th, 2010 @ 06:52 PM | in 1.3.0 rc2 (closed)

This is from the Depender.Client.js file in the depender django app:

    console.log('creating script: ', src.join('&'));
    var script = new Element('script', {
        src: src.join('&'),
        events: {
            //IE doesn't fire a load event for scripts, so we monitor the ready state
            readystatechange: function(){
                if (['loaded', 'complete'].contains(this.readyState) && !finished) {
                    finished = true;
            load: function(){
                if (!finished) {
                    finished = true;
    console.log('created script: ', script);
    script.inject( || document.head);

The load event above fires immediately before the console.log('created script') line.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Referenced by