@@ -112,8 +112,8 @@ extern "C" {
112
112
#[ wasm_bindgen]
113
113
pub fn escape ( string : & str ) -> JsString ;
114
114
115
- /// The unescape() function computes a new string in which hexadecimal escape
116
- /// sequences are replaced with the character that it represents. The escape sequences might
115
+ /// The unescape() function computes a new string in which hexadecimal escape
116
+ /// sequences are replaced with the character that it represents. The escape sequences might
117
117
/// be introduced by a function like escape. Usually, decodeURI or decodeURIComponent
118
118
/// are preferred over unescape.
119
119
///
@@ -1859,8 +1859,9 @@ extern "C" {
1859
1859
/// arguments as specified.
1860
1860
///
1861
1861
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/apply
1862
- #[ wasm_bindgen( static_method_of = Reflect ) ]
1863
- pub fn apply ( target : & Function , this_argument : & JsValue , arguments_list : & Array ) -> JsValue ;
1862
+ #[ wasm_bindgen( static_method_of = Reflect , catch) ]
1863
+ pub fn apply ( target : & Function , this_argument : & JsValue , arguments_list : & Array )
1864
+ -> Result < JsValue , JsValue > ;
1864
1865
1865
1866
/// The static `Reflect.construct()` method acts like the new operator, but
1866
1867
/// as a function. It is equivalent to calling `new target(...args)`. It
@@ -1891,7 +1892,7 @@ extern "C" {
1891
1892
///
1892
1893
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/get
1893
1894
#[ wasm_bindgen( static_method_of = Reflect ) ]
1894
- pub fn get ( target : & Object , key : & JsValue ) -> JsValue ;
1895
+ pub fn get ( target : & JsValue , key : & JsValue ) -> JsValue ;
1895
1896
1896
1897
/// The static `Reflect.getOwnPropertyDescriptor()` method is similar to
1897
1898
/// `Object.getOwnPropertyDescriptor()`. It returns a property descriptor
@@ -1908,14 +1909,14 @@ extern "C" {
1908
1909
///
1909
1910
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/getPrototypeOf
1910
1911
#[ wasm_bindgen( static_method_of = Reflect , js_name = getPrototypeOf) ]
1911
- pub fn get_prototype_of ( target : & Object ) -> Object ;
1912
+ pub fn get_prototype_of ( target : & JsValue ) -> Object ;
1912
1913
1913
1914
/// The static `Reflect.has()` method works like the in operator as a
1914
1915
/// function.
1915
1916
///
1916
1917
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/has
1917
1918
#[ wasm_bindgen( static_method_of = Reflect ) ]
1918
- pub fn has ( target : & Object , property_key : & JsValue ) -> bool ;
1919
+ pub fn has ( target : & JsValue , property_key : & JsValue ) -> bool ;
1919
1920
1920
1921
/// The static `Reflect.isExtensible()` method determines if an object is
1921
1922
/// extensible (whether it can have new properties added to it). It is
@@ -1930,7 +1931,7 @@ extern "C" {
1930
1931
///
1931
1932
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys
1932
1933
#[ wasm_bindgen( static_method_of = Reflect , js_name = ownKeys) ]
1933
- pub fn own_keys ( target : & Object ) -> Array ;
1934
+ pub fn own_keys ( target : & JsValue ) -> Array ;
1934
1935
1935
1936
/// The static `Reflect.preventExtensions()` method prevents new
1936
1937
/// properties from ever being added to an object (i.e. prevents
@@ -1946,9 +1947,9 @@ extern "C" {
1946
1947
///
1947
1948
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/set
1948
1949
#[ wasm_bindgen( static_method_of = Reflect ) ]
1949
- pub fn set ( target : & Object , property_key : & JsValue , value : & JsValue ) -> bool ;
1950
+ pub fn set ( target : & JsValue , property_key : & JsValue , value : & JsValue ) -> bool ;
1950
1951
#[ wasm_bindgen( static_method_of = Reflect , js_name = set) ]
1951
- pub fn set_with_receiver ( target : & Object , property_key : & JsValue , value : & JsValue , receiver : & Object ) -> bool ;
1952
+ pub fn set_with_receiver ( target : & JsValue , property_key : & JsValue , value : & JsValue , receiver : & JsValue ) -> bool ;
1952
1953
1953
1954
/// The static `Reflect.setPrototypeOf()` method is the same
1954
1955
/// method as `Object.setPrototypeOf()`. It sets the prototype
0 commit comments