mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-12 05:47:15 +00:00
js-sys: Move Intl
from a type to a module, since it is a namespace
This commit is contained in:
parent
a66c4de892
commit
7f5d0a2158
@ -3127,20 +3127,22 @@ extern "C" {
|
|||||||
pub fn value_of(this: &Symbol) -> Symbol;
|
pub fn value_of(this: &Symbol) -> Symbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
pub mod Intl {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
// Intl
|
// Intl
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub type Intl;
|
|
||||||
|
|
||||||
/// The `Intl.getCanonicalLocales()` method returns an array containing
|
/// The `Intl.getCanonicalLocales()` method returns an array containing
|
||||||
/// the canonical locale names. Duplicates will be omitted and elements
|
/// the canonical locale names. Duplicates will be omitted and elements
|
||||||
/// will be validated as structurally valid language tags.
|
/// will be validated as structurally valid language tags.
|
||||||
///
|
///
|
||||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales
|
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales
|
||||||
#[wasm_bindgen(static_method_of = Intl, js_name = getCanonicalLocales)]
|
#[wasm_bindgen(js_name = getCanonicalLocales, js_namespace = Intl)]
|
||||||
pub fn get_canonical_locales(s: &JsValue) -> Array;
|
pub fn get_canonical_locales(s: &JsValue) -> Array;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Promise
|
// Promise
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user