js-sys: Add bindings to ReferenceError

This commit is contained in:
Nick Fitzgerald
2018-08-10 13:03:56 -07:00
parent 879fd43edb
commit dc028d38c8
3 changed files with 34 additions and 0 deletions

View File

@ -2103,6 +2103,25 @@ extern {
pub fn new(message: &str) -> RangeError;
}
// ReferenceError
#[wasm_bindgen]
extern {
/// The ReferenceError object represents an error when a non-existent
/// variable is referenced.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError
#[wasm_bindgen(extends = Error)]
#[derive(Clone, Debug)]
pub type ReferenceError;
/// The ReferenceError object represents an error when a non-existent
/// variable is referenced.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError
#[wasm_bindgen(constructor)]
pub fn new(message: &str) -> ReferenceError;
}
// Reflect
#[wasm_bindgen]
extern "C" {