Open EarlMilktea opened 3 months ago
Yes I got the same problem. I can think of 2 workarounds:
postMessage
that he is done. The caller could then wait for this signal.initialized
or finalExport
which the worker/exposer would call after everything has been exposed.Edit: This problem is already known #635 https://github.com/GoogleChromeLabs/comlink/issues/635#issuecomment-1590972739
Problem description
Wrapped function does not return when called before the worker is ready.
Minimum codes to reproduce
Deps.