Is there a way to detect that a web-worker has been loaded. I looked at the spec but there is only an
There is not by design. This was planned originally, but got taken out later on. I forgot the rationale, but I suspect it is related to certain implementations allowing the allocation of many workers, but only running a couple at the time.
(There are some plans to improve this, in particular if
SharedArrayBuffer happens, which needs that kind of information, but there's no standard way now.)
A workaround might be to fetch the code in advance and then initiate the worker from a blob URL.