feat: add Reflect.ownKeys

This commit is contained in:
Jannik Keye
2018-07-04 12:53:38 +02:00
parent eb245d5503
commit e36f982391
2 changed files with 53 additions and 1 deletions

View File

@ -1041,7 +1041,7 @@ extern "C" {
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/has
#[wasm_bindgen(static_method_of = Reflect, catch)]
pub fn has(target: &JsValue, property_key: &JsValue) -> Result<JsValue, JsValue>;
pub fn has(target: &JsValue, property_key: &JsValue) -> Result<bool, JsValue>;
/// The static Reflect.isExtensible() method determines if an object is extensible
/// (whether it can have new properties added to it). It is similar to
@ -1050,6 +1050,13 @@ extern "C" {
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible
#[wasm_bindgen(static_method_of = Reflect, js_name = isExtensible, catch)]
pub fn is_extensible(target: &Object) -> Result<JsValue, JsValue>;
/// The static Reflect.ownKeys() method returns an array of the
/// target object's own property keys.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys
#[wasm_bindgen(static_method_of = Reflect, js_name = ownKeys, catch)]
pub fn own_keys(target: &Object) -> Result<JsValue, JsValue>;
}
// Set