From 56fa901442e6f826b01e4976bc5aa8a80c83f727 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Fri, 22 Jun 2018 14:11:07 -0700 Subject: [PATCH] js::Object: Sort methods alphabetically --- src/js.rs | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/js.rs b/src/js.rs index c5f0d51e..58d0cdd3 100644 --- a/src/js.rs +++ b/src/js.rs @@ -278,12 +278,6 @@ extern { extern { pub type Object; - /// The Object constructor creates an object wrapper. - /// - /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object - #[wasm_bindgen(constructor)] - pub fn new() -> Object; - /// The `hasOwnProperty()` method returns a boolean indicating whether the /// object has the specified property as its own property (as opposed to /// inheriting it). @@ -292,6 +286,26 @@ extern { #[wasm_bindgen(method, js_name = hasOwnProperty)] pub fn has_own_property(this: &Object, property: &JsValue) -> bool; + /// The isPrototypeOf() method checks if an object exists in another + /// object's prototype chain. + /// + /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf + #[wasm_bindgen(method, js_name = isPrototypeOf)] + pub fn is_prototype_of(this: &Object, value: &JsValue) -> bool; + + /// The Object constructor creates an object wrapper. + /// + /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object + #[wasm_bindgen(constructor)] + pub fn new() -> Object; + + /// The propertyIsEnumerable() method returns a Boolean indicating + /// whether the specified property is enumerable. + /// + /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable + #[wasm_bindgen(method, js_name = propertyIsEnumerable)] + pub fn property_is_enumerable(this: &Object, property: &JsValue) -> bool; + /// The toLocaleString() method returns a string representing the object. /// This method is meant to be overridden by derived objects for locale-specific /// purposes. @@ -306,20 +320,6 @@ extern { #[wasm_bindgen(method, js_name = toString)] pub fn to_string(this: &Object) -> JsString; - /// The isPrototypeOf() method checks if an object exists in another - /// object's prototype chain. - /// - /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf - #[wasm_bindgen(method, js_name = isPrototypeOf)] - pub fn is_prototype_of(this: &Object, value: &JsValue) -> bool; - - /// The propertyIsEnumerable() method returns a Boolean indicating - /// whether the specified property is enumerable. - /// - /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable - #[wasm_bindgen(method, js_name = propertyIsEnumerable)] - pub fn property_is_enumerable(this: &Object, property: &JsValue) -> bool; - /// The valueOf() method returns the primitive value of the /// specified object. ///