Worker.postMessage's second parameter type should be array of Transferables
Closed this issue · 2 comments
ochrons commented
As stated in https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage
Right now the parameter type is js.Any
which of course works, but is not type safe.
The parameter type is correct in DedicatedWorkerGlobalScope.postMessage
but I suppose it has not been updated to the Worker
trait.
exoego commented
I think js.Any
on message
is fine since it is described as The data may be any value or JavaScript object handled by the structured clone algorithm
.
armanbilge commented
I think
js.Any
onmessage
is fine since it is described asThe data may be any value or JavaScript object handled by the structured clone algorithm
.
I think that's the first parameter, this issue seems to be referring to the second.