feat: add Reflect.get

This commit is contained in:
Jannik Keye
2018-07-04 12:31:24 +02:00
parent 5fa18f8f40
commit 3ba00bc13c
2 changed files with 62 additions and 6 deletions

View File

@ -1012,6 +1012,13 @@ extern "C" {
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/deleteProperty
#[wasm_bindgen(static_method_of = Reflect, js_name = deleteProperty, catch)]
pub fn delete_property(target: &JsValue, key: &JsValue) -> Result<JsValue, JsValue>;
/// The static Reflect.get() method works like getting a property from
/// an object (target[propertyKey]) as a function.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/get
#[wasm_bindgen(static_method_of = Reflect, catch)]
pub fn get(target: &JsValue, key: &JsValue) -> Result<JsValue, JsValue>;
}
// Set