mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-20 00:11:23 +00:00
Add bindings for Intl.getCanonicalLocales
This commit is contained in:
14
src/js.rs
14
src/js.rs
@ -1628,3 +1628,17 @@ extern "C" {
|
||||
#[wasm_bindgen(static_method_of = Symbol, getter, structural, js_name = toStringTag)]
|
||||
pub fn to_string_tag() -> Symbol;
|
||||
}
|
||||
|
||||
// Intl
|
||||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
pub type Intl;
|
||||
|
||||
/// The `Intl.getCanonicalLocales()` method returns an array containing
|
||||
/// the canonical locale names. Duplicates will be omitted and elements
|
||||
/// will be validated as structurally valid language tags.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales
|
||||
#[wasm_bindgen(static_method_of = Intl, js_name = getCanonicalLocales)]
|
||||
pub fn get_canonical_locales(s: &JsValue) -> Array;
|
||||
}
|
Reference in New Issue
Block a user