js-sys: Add exports getter to WebAssembly.Instance

Part of #275
This commit is contained in:
Nick Fitzgerald
2018-09-06 14:16:28 -07:00
parent cb2aa999c0
commit 8b5f5a7560
2 changed files with 16 additions and 1 deletions

View File

@ -2917,6 +2917,15 @@ pub mod WebAssembly {
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance)
#[wasm_bindgen(catch, constructor, js_namespace = WebAssembly)]
pub fn new(module: &Module, imports: &Object) -> Result<Instance, JsValue>;
/// The `exports` readonly property of the `WebAssembly.Instance` object
/// prototype returns an object containing as its members all the
/// functions exported from the WebAssembly module instance, to allow
/// them to be accessed and used by JavaScript.
///
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance/exports)
#[wasm_bindgen(getter, method, js_namespace = WebAssembly)]
pub fn exports(this: &Instance) -> Object;
}
// WebAssembly.LinkError