Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Worker.postMessage's second parameter type should be array of Transferables #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ochrons opened this issue Jul 30, 2016 · 2 comments · Fixed by #563
Closed

Worker.postMessage's second parameter type should be array of Transferables #238

ochrons opened this issue Jul 30, 2016 · 2 comments · Fixed by #563

Comments

@ochrons
Copy link

ochrons commented Jul 30, 2016

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.

@ochrons ochrons changed the title Worker.postMessage's second parameter type should be Transferlist Worker.postMessage's second parameter type should be array of Transferables Jul 30, 2016
@exoego
Copy link
Contributor

exoego commented May 14, 2019

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
Copy link
Member

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.

I think that's the first parameter, this issue seems to be referring to the second.

japgolly added a commit that referenced this issue Sep 6, 2021
@armanbilge armanbilge added this to the v2.0.0 milestone Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants