-
Notifications
You must be signed in to change notification settings - Fork 14
Review implementability of WebAssembly.Function #16
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
Comments
Thanks for bringing this up. The main motivation for adding the I am not sure what the original intention of inheriting from |
Well, it has the prototype and properties of a regular function, i.e., is a subclass. If WebIDL has no way to describe that then we have to invent our own. :) |
@Ms2ger, we cannot build the conversion into Table#set, because it doesn't know the intended function type. |
What is the intended effect then? Do we want |
I'd expect the answer to that to be "yes".
Can you say more about why that would be the case? These are functions, and can be used in all the places functions can be used. |
Absolutely yes. In addition to what @tschneidereit said, that is what you get today for a Wasm exported function. Clearly that shouldn't change all of a sudden. |
Ah, I didn't know that it's possible in JS to subclass |
@Ms2ger can you clarify what exactly the problem with the original snippet is? Is it that |
That's certainly the first issue, yes. |
See whatwg/webidl#937 for the existing issue against WebIDL asking how to specify this. |
As I understand TC39 |
The snippet
is not valid WebIDL, and I don't see a clear way to make it so.
Note that it's already possible (though a little tedious) to create a host function from a JS function:
We could easily introduce this coercion in Table#set() as well, without necessarily introducing this new type.
The text was updated successfully, but these errors were encountered: