pub fn show_with_options<S: Into<String>>(
html: S,
window_options: WindowOptions,
) -> Result<(), ViewerError>Expand description
Display HTML with custom window configuration.
This is a convenience function that allows you to customize the window while using the simple blocking API.
§Examples
Custom window size and title:
use html_view::{show_with_options, WindowOptions};
let mut window = WindowOptions::default();
window.width = Some(800);
window.height = Some(600);
window.title = Some("My Custom Window".to_string());
show_with_options("<h1>Custom Window</h1>", window).unwrap();Frameless window:
use html_view::{show_with_options, WindowOptions};
let mut window = WindowOptions::default();
window.decorations = false;
window.always_on_top = true;
show_with_options("<h1>Always on Top</h1>", window).unwrap();§Errors
See show for error documentation.