MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_get_language

Function bloom_get_language

native/web/src/lib.rs:1941–1946  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1939
1940#[wasm_bindgen]
1941pub fn bloom_get_language() -> f64 {
1942 // navigator.language (e.g. "en-US" / "zh-Hans") -> packed 2-letter code.
1943 let lang = web_sys::window().and_then(|w| w.navigator().language()).unwrap_or_default();
1944 let b = lang.to_ascii_lowercase().into_bytes();
1945 if b.len() >= 2 { (b[0] as f64) * 256.0 + (b[1] as f64) } else { 25966.0 }
1946}
1947
1948#[wasm_bindgen]
1949pub fn bloom_is_any_input_pressed() -> f64 {

Callers

nothing calls this directly

Calls 1

windowFunction · 0.85

Tested by

no test coverage detected