Add extends to js-sys:Intl.NumberFormat

This commit is contained in:
Mason Stallmo 2018-08-19 10:19:03 -05:00
parent 780c7236f1
commit ee131888da
2 changed files with 5 additions and 1 deletions

View File

@ -3496,7 +3496,7 @@ pub mod Intl {
/// that enable language sensitive number formatting.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat
#[wasm_bindgen(js_namespace = Intl)]
#[wasm_bindgen(extends = Object, js_namespace = Intl)]
#[derive(Clone, Debug)]
pub type NumberFormat;

View File

@ -72,6 +72,10 @@ fn number_format() {
let a = Intl::NumberFormat::supported_locales_of(&locales, &opts);
assert!(a.is_instance_of::<Array>());
assert!(n.is_instance_of::<Intl::NumberFormat>());
assert!(n.is_instance_of::<Object>());
let _: &Object = n.as_ref();
}
#[wasm_bindgen_test]