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

@ -127,6 +127,9 @@ fn table_error() {
fn table() {
let table = WebAssembly::Table::new(&get_table_object().into()).unwrap();
assert_eq!(table.length(), 1);
assert!(table.get(0).is_ok());
assert!(table.get(999).is_err());
}
#[wasm_bindgen_test]