Just wondering if it's possible to update a progress bar while using the FileReader (readAsText) or, if not, another way of manipulating a file into arrays/objects and updating a bar accordingly.
More specifically per line of that text file.
reader.onloadend = function (data) {
var log = data.target.result.split('\n');
for (var i in log){
console.log(i);
$('.progress-bar').attr('ariavaluenow',i).css('width',i).text(i+'%')
}
};
Assume the progress bar HTML and CSS is already loaded.
I can see the console updating but the progress bar loads at the end with the finished value.
I've tried the above in onprogress
but the same result so I'm obviously missing something.
If it's in SO please link me :) and, of course, if you need more info please let me know. I'm relativity new to JavaScript.