1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-27 00:54:15 +01:00

Dev: API fixes for IE8-

- IE8- requires that Function.prototype.apply be used with an array or
  arguments object as the second parameter - it being "array-like" isn't
  good enough.

- This fixes DataTables/DataTables #262
This commit is contained in:
Allan Jardine 2014-01-15 09:36:02 +00:00
parent 96af1f5cf3
commit fe7d64e0ef
2 changed files with 5 additions and 9 deletions

View File

@ -1 +1 @@
49be4d755162e49ae871b2ad1f42b7706274f538
f06ee8a003374ac5653079a2fc2587e496f7480f

View File

@ -6318,8 +6318,6 @@
var __arrayProto = Array.prototype;
/**
* Abstraction for `context` parameter of the `Api` constructor to allow it to
* take several different forms for ease of use.
@ -6369,7 +6367,7 @@
return jq.map( function(i) {
idx = $.inArray( this, tables );
return idx !== -1 ? settings[idx] : null;
} );
} ).toArray();
}
};
@ -6458,7 +6456,7 @@
// Initial data
if ( data ) {
this.push.apply( this, data );
this.push.apply( this, data.toArray ? data.toArray() : data );
}
// selector
@ -6532,7 +6530,7 @@
flatten: function ()
{
var a = [];
return new _Api( this.context, a.concat.apply( a, this ) );
return new _Api( this.context, a.concat.apply( a, this.toArray() ) );
},
@ -6758,8 +6756,6 @@
};
_Api.extend = function ( scope, obj, ext )
{
// Only extend API instances and static properties of the API
@ -7544,7 +7540,7 @@
// Return an Api.rows() extended instance, so rows().nodes() etc can be used
var modRows = this.rows( -1 );
modRows.pop();
modRows.push.apply( modRows, newRows );
modRows.push.apply( modRows, newRows.toArray() );
return modRows;
} );