Add binding for Object.getPrototypeOf()

This commit is contained in:
Michael Hoffmann
2018-09-19 21:10:40 +02:00
parent 76969bd1e3
commit 326e4c0262
2 changed files with 21 additions and 0 deletions

View File

@ -2055,6 +2055,14 @@ extern "C" {
#[wasm_bindgen(static_method_of = Object, js_name = getOwnPropertySymbols)]
pub fn get_own_property_symbols(obj: &Object) -> Array;
/// The Object.getPrototypeOf() method returns the prototype
/// (i.e. the value of the internal [[Prototype]] property) of the
/// specified object.
///
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf)
#[wasm_bindgen(static_method_of = Object, js_name = getPrototypeOf)]
pub fn get_prototype_of(obj: &JsValue) -> Object;
/// The `hasOwnProperty()` method returns a boolean indicating whether the
/// object has the specified property as its own property (as opposed to
/// inheriting it).