diff --git a/crates/js-sys/src/lib.rs b/crates/js-sys/src/lib.rs index 487fc095..8b4e2854 100644 --- a/crates/js-sys/src/lib.rs +++ b/crates/js-sys/src/lib.rs @@ -3401,7 +3401,7 @@ pub mod Intl { /// that enable language sensitive string comparison. /// /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator - #[wasm_bindgen(js_namespace = Intl)] + #[wasm_bindgen(extends = Object, js_namespace = Intl)] #[derive(Clone, Debug)] pub type Collator; diff --git a/crates/js-sys/tests/wasm/Intl.rs b/crates/js-sys/tests/wasm/Intl.rs index 6fc8add6..a22b75e4 100644 --- a/crates/js-sys/tests/wasm/Intl.rs +++ b/crates/js-sys/tests/wasm/Intl.rs @@ -35,6 +35,10 @@ fn collator() { let a = Intl::Collator::supported_locales_of(&locales, &opts); assert!(a.is_instance_of::()); + + assert!(c.is_instance_of::()); + assert!(c.is_instance_of::()); + let _: &Object = c.as_ref(); } #[wasm_bindgen_test]