-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Description
Description
I am getting an error in v3.2.1 that I was not getting in v1.12.3 and I have traced it to the jQuery.fn.load function.
In v1.12.3, the jQuery.fn.load function begins as such.
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( " " );
In v3.2.1, the jQuery.fn.load function begins as such.
jQuery.fn.load = function( url, params, callback ) { var selector, type, response, self = this, off = url.indexOf( " " );
The lines
if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); }
have been removed out of the new version.
The error occurs when I try to run this snippet of code.
var ifr = $('<iframe/>', { src: url, load: function() { alert('here'); }, frameborder: '0' });
The definition of load within the iframe creation is what is causing the TypeError.