Skip to content

Allow JS functions to be directly added to via table.set? #28

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
sbc100 opened this issue Mar 24, 2021 · 2 comments
Closed

Allow JS functions to be directly added to via table.set? #28

sbc100 opened this issue Mar 24, 2021 · 2 comments

Comments

@sbc100
Copy link
Member

sbc100 commented Mar 24, 2021

See WebAssembly/design#1408

I wonder if we can add this to this proposal. It not only avoids having to use the WebAssembly.Function API everywhere but its more flexible because it means we don't need to know ahead of time the signature of the function being implemented in JS and it allows us to take advantage of JS polymorphism in the same way we already can for imports.

@SPY
Copy link
Collaborator

SPY commented Oct 19, 2023

I believe this proposal doesn't suite a suggested change.
JS Types Reflection is focused on getting data from Wasm to JS and for that purpose WebAssembly.Function is introduced as a missing piece for type() method.
The fact WebAssembly.Function opens a possibility for setting JS functions to WebAssembly.Tables without creating a temporary module is a convenience bonus, but not a purpose of this proposal.

@sbc100
Copy link
Member Author

sbc100 commented Oct 19, 2023

Closing this for now. We can continue to discuss this in WebAssembly/design#1408

@sbc100 sbc100 closed this as completed Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants