We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider the following example:
// worker.js importScripts("./iife/synclink.js"); function raiseFromWorker(){ const err = new Error("hi!"); err.xxx = 42; throw err; } Synclink.expose(raiseFromWorker);
<!-- index.html > <html> <head> <script> async function main() { const Synclink = await import("./esm/synclink.mjs"); let raiseFromWorker = Synclink.wrap(new Worker("worker.js")) try { await raiseFromWorker(); } catch(err) { //console.log(err); console.log(err.message); console.log(err.xxx); } } main(); </script> </head> </html>
The attribute xxx is not preserved across the boundary. I think it would be nice/useful/expected that it is. For example, this would remove the need for this ugly hack in pyscript: https://github.com/pyscript/pyscript/blob/b247864414ae813b6ff73792d10a344bc4d477f9/pyscriptjs/src/main.ts#L30-L41
xxx
If I understand correctly, the relevant code is here: https://github.com/hoodmane/synclink/blob/cc08aab7d28f5b5573c80a3766714944bf666160/src/transfer_handlers.ts#L156-L164
would it be possible to iterate over all attributes and transfer them?
The text was updated successfully, but these errors were encountered:
Yes, this should be a simple patch.
Sorry, something went wrong.
No branches or pull requests
Consider the following example:
The attribute
xxx
is not preserved across the boundary.I think it would be nice/useful/expected that it is.
For example, this would remove the need for this ugly hack in pyscript:
https://github.com/pyscript/pyscript/blob/b247864414ae813b6ff73792d10a344bc4d477f9/pyscriptjs/src/main.ts#L30-L41
If I understand correctly, the relevant code is here:
https://github.com/hoodmane/synclink/blob/cc08aab7d28f5b5573c80a3766714944bf666160/src/transfer_handlers.ts#L156-L164
would it be possible to iterate over all attributes and transfer them?
The text was updated successfully, but these errors were encountered: