WebAssembly / reference-types

Proposal for adding basic reference types (anyref)
https://webassembly.github.io/reference-types/
Other
163 stars 40 forks source link

There is no DefaultValue for anyfunc/funcref #127

Closed dbezhetskov closed 3 years ago

dbezhetskov commented 3 years ago

There is no DefaultValue for anyfunc/funcref: https://webassembly.github.io/reference-types/js-api/index.html#defaultvalue

But actually the chrome and firefox suppose that this is null, for example when you construct a Table({ "element": "anyfunc", "initial": 1 }) and the second argument is missing, firefox and chome just initialize the table with nulls and don't throw any exceptions.

Should we add the missing case for DefaultValue?

rossberg commented 3 years ago

I think this is fixed by #128.