pub fn escape(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)));