Skip to content

What is the difference between ontransfer and onmessage for Workers? #51

Answered by ialex32x
GeTechG asked this question in Q&A
Discussion options

You must be logged in to vote

For now , it's better to post only pure JS values as messages. (JS objects of godot Object & Variant are not supported)

The underlying mechanism onmessage used is serializer/deserializer in different JS runtimes, it's challenging to implement it compatible between all JS runtimes.
When using web.impl or jsc.impl, the only way to serialize/deserialize is JSON.
And, it's impossible to serialize custom JS objects in quickjs.

EDIT: JSWorker has not been implemented in web.impl and jsc.impl.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GeTechG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants