js-sys: Add bindings to WebAssembly.Table.prototype.get

Part of #275
This commit is contained in:
Nick Fitzgerald
2018-09-06 14:54:49 -07:00
parent fb5e6e9c06
commit 2d4f36c9da
2 changed files with 10 additions and 0 deletions

View File

@ -3061,6 +3061,13 @@ pub mod WebAssembly {
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table/length)
#[wasm_bindgen(method, getter, js_namespace = WebAssembly)]
pub fn length(this: &Table) -> u32;
/// The `get()` prototype method of the `WebAssembly.Table()` object
/// retrieves a function reference stored at a given index.
///
/// [MDN documentation](
#[wasm_bindgen(method, catch, js_namespace = WebAssembly)]
pub fn get(this: &Table, index: u32) -> Result<Function, JsValue>;
}
// WebAssembly.Memory