browserinfo
Provides the javascript string and rust struct that are required when running javascript and collecting information.
How to use
In dioxus, it is used as follows.
user agent
use dioxus_document as document;
use ;
let js_ua: &str = user_agent_js;
let eval = eval.await?;
let json_str = eval.to_string;
let user_agent: UserAgent = from_str?;
browser info
use dioxus_document as document;
use ;
let js_bro: &str = broinfo_js;
let eval = eval.await?;
let json_str = eval.to_string;
let broinfo: BroInfo = from_str?;
// Generate `Browser` from `UserAgent`
let browser = broinfo.to_browser;
Changelogs
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.