Re: [service-workers] FileReader and ServiceWorker compatible?

On Fri, Sep 27, 2019 at 12:51 AM Kevin Doan <kevindoandash@gmail.com> wrote:

> So I was reading the Mozilla documentation and I learnt that
> URL.createObjectURL() does not work with serviceworker due to memory
> leakage so I was wondering does this also apply to FIleReader? In the docs
> the note says its available with Web Workers but does not say that it
> wouldn't work with a serviceworker.
>

FileReader should work just fine in service workers (as should the newer
Blob.stream() <https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream>
, Blob.text() <https://developer.mozilla.org/en-US/docs/Web/API/Blob/text>
 and Blob.arrayBuffer()
<https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer> methods,
in browsers where those are implemented).

Received on Friday, 27 September 2019 17:17:47 UTC