JavaScript-ID3-Reader icon indicating copy to clipboard operation
JavaScript-ID3-Reader copied to clipboard

Available inside web worker?

Open JokerQyou opened this issue 10 years ago • 2 comments

Hi! I was trying to use this library inside a web worker, since there might be a lot of files to parse in my case. But I found a reference of document in the minimized script (here in the source code: line 144), which would cause error. Is it currently possible to use this inside a web worker? If not, is it possible in the future? Thanks.

JokerQyou avatar Feb 23 '15 05:02 JokerQyou

That whole last block can be wrapped inside an if (typeof document !== "undefined") as it's only useful for old versions of IE that don't implement web works anyway.

aadsm avatar Feb 23 '15 15:02 aadsm

I've removed that last block since I don't need it, but your suggestion is much better.

JokerQyou avatar Feb 24 '15 14:02 JokerQyou