@@ -3400,6 +3400,14 @@ extern "C" {
3400
3400
///
3401
3401
/// There are a few bindings to `from_char_code` in `js-sys`: `from_char_code1`, `from_char_code2`, etc...
3402
3402
/// with different arities.
3403
+ ///
3404
+ /// Additionally, this function accepts `u16` for character codes, but
3405
+ /// fixing others requires a breaking change release
3406
+ /// (see https://github.com/rustwasm/wasm-bindgen/issues/1460 for details).
3407
+ #[ wasm_bindgen( static_method_of = JsString , js_class = "String" , js_name = fromCharCode, variadic) ]
3408
+ pub fn from_char_code ( char_codes : & [ u16 ] ) -> JsString ;
3409
+
3410
+ /// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode)
3403
3411
#[ wasm_bindgen( static_method_of = JsString , js_class = "String" , js_name = fromCharCode) ]
3404
3412
pub fn from_char_code1 ( a : u32 ) -> JsString ;
3405
3413
@@ -3432,6 +3440,10 @@ extern "C" {
3432
3440
///
3433
3441
/// There are a few bindings to `from_code_point` in `js-sys`: `from_code_point1`, `from_code_point2`, etc...
3434
3442
/// with different arities.
3443
+ #[ wasm_bindgen( catch, static_method_of = JsString , js_class = "String" , js_name = fromCodePoint, variadic) ]
3444
+ pub fn from_code_point ( code_points : & [ u32 ] ) -> Result < JsString , JsValue > ;
3445
+
3446
+ /// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)
3435
3447
#[ wasm_bindgen( catch, static_method_of = JsString , js_class = "String" , js_name = fromCodePoint) ]
3436
3448
pub fn from_code_point1 ( a : u32 ) -> Result < JsString , JsValue > ;
3437
3449
0 commit comments