Skip to content

WebAssembly.Table methods are incorrect #3708

Open
@ten3roberts

Description

@ten3roberts

Describe the Bug

The WebAssembly table can hold either externref or anyfunc. However, the API in js-sys uses Function in its methods, rather than the more permissive JsValue.

Additionally, functions accepting a second parameter are not reflected, such as the constructor, and the grow method which can take a second (optional) init parameter.

The API should ideally reflect the JavaScript API and allow for these use cases

Additional Context

Add any other context about the problem here.

MDN documentation: https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Table
Js-sys documentation: https://docs.rs/js-sys/0.3.65/js_sys/WebAssembly/struct.Table.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions