Web Worker FileReaderSync
I am reading in files inside of a web worker. However, when I try to read
the file I keep getting this error: Uncaught DataCloneError: An object
could not be cloned. The only line of code that throws this error is the
reader.readAsText(file). Can anyone explain why this is happening?
var path = e.data;
var file = fs.root.getFile(path, { create: false });
var reader = new FileReaderSync();
postMessage(reader.readAsText(file));
No comments:
Post a Comment