In Firefox, the following code works correctly when run in the main browser thread as normal--
var fr = new FileReader();
..but when run from a web worker, the following error is thrown:
FileReader is not defined
The same code works fine in Chrome and Safari.
Any suggestions for supporting FileReader in a web worker in Firefox?
As adeneo pointed out, it seems that FileReader
is simply not supported by Firefox in Web Workers. I was able to use FileReaderSync
instead to accomplish what I needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With