Function dioxus_mobile::escape::escape_js_string[][src]

pub fn escape_js_string(string: &str) -> Escaper<'_>
Expand description

Escape a string to pass it into JavaScript.

Example

let string = "Hello, world!";

// Calls the function callback with "Hello, world!" as its parameter.

view.eval(&format!("callback({});", web_view::escape(string)));