aadsm / JavaScript-ID3-Reader

ID3 tags reader in JavaScript (ID3v1, ID3v2 and AAC)

Home Page:http://www.aadsm.net/libraries/id3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Available inside web worker?

JokerQyou opened this issue · 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.

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.

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