javascript - FileReaderSync.ReadAsText() takes long time to read and no callback -


i trying read big text file using filereadersync , therefore logic has been implemented below :

// entry file validated before    var result = reader.readastext(entryfile.file());    // @ point result not filled yet   // therefore on next line parsing json throwing error     return json.parse(result); 

the problem result not filled few seconds, , therefore throws exception, tried onload or onloadended events there these events not fired (probably not supported ?)

anyone knows how possible continue process after read completed ?


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -