]> source.dussan.org Git - jquery.git/commitdiff
Revert "Ajax: Remove remnants of the load event alias handling"
authorOleg Gaidarenko <markelog@gmail.com>
Wed, 11 Nov 2015 16:34:35 +0000 (19:34 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Wed, 11 Nov 2015 16:34:35 +0000 (19:34 +0300)
This reverts commit 38a669735d08bcbd28cfb0d77eee82c67aa89eeb.

src/ajax/load.js

index 82f0cf308086e6e4f4c5654f5ef8b5d5c9ea1022..0f1b986f80f15151e1350b4567cabaf519add8d3 100644 (file)
@@ -4,13 +4,22 @@ define( [
        "../ajax",
        "../traversing",
        "../manipulation",
-       "../selector"
+       "../selector",
+       // Optional event/alias dependency
+       "../event/alias"
 ], function( jQuery ) {
 
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
 /**
  * Load a url into a page
  */
 jQuery.fn.load = function( url, params, callback ) {
+       if ( typeof url !== "string" && _load ) {
+               return _load.apply( this, arguments );
+       }
+
        var selector, type, response,
                self = this,
                off = url.indexOf( " " );