Make WordPress Core

Ticket #19189: 19189.addEventListener.diff

File 19189.addEventListener.diff, 535 bytes (added by duck_, 14 years ago)
  • wp-includes/js/autosave.dev.js

     
    4848                }
    4949        };
    5050
    51         $(window).unload( function() {
     51        window.addEventListener( 'unload', function() {
    5252                if ( ! autosaveLockRelease )
    5353                        return;
    5454                $.ajax({
     
    6262                                active_post_lock: $('#active_post_lock').val()
    6363                        }
    6464                });
    65         } );
     65        }, false );
    6666
    6767        // preview
    6868        $('#post-preview').click(function(){