Browse Source

Support webkitSlice if slice is not available

pull/59/head
Amadeus Folego 11 years ago
parent
commit
b5a4ece298
  1. 10
      jquery.parse.js

10
jquery.parse.js

@ -196,7 +196,15 @@ @@ -196,7 +196,15 @@
{
if (start < file.size)
{
reader.readAsText(file.slice(start, Math.min(start + settings.chunkSize, file.size)), settings.config.encoding);
var end = Math.min(start + settings.chunkSize, file.size);
if (file.slice) {
reader.readAsText(file.slice(start, end), settings.config.encoding);
}
else if (file.webkitSlice) {
reader.readAsText(file.webkitSlice(start, end), settings.config.encoding);
}
start += settings.chunkSize;
}
};

Loading…
Cancel
Save