wasm_bindgen::JsValue::from_bool function

Example

Creates a new JSValue representing a boolean.


pub fn jsvalue_from_bool() {
    let js_bool=JsValue::from_bool(true);
    web_sys::console::log_2(&"Get Value:%s".into(),&js_bool);
}
                                    

Function


        pub fn from_bool(b: bool) -> JsValue
           

features/dependencies

Source Code