Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
defims committed Dec 4, 2023
1 parent bd6f0bb commit 214b53b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/host_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use wry::WebViewBuilder;

#[cfg(target_os = "windows")]
fn main() -> wry::Result<()> {
use wry::WebViewExtWindows;

let event_loop = EventLoop::new();
let window = WindowBuilder::new().build(&event_loop).unwrap();

use wry::WebViewExtWindows;
use windows::{
core::{w, BSTR},
Win32::{
Expand All @@ -30,6 +30,8 @@ fn main() -> wry::Result<()> {
}
};
use std::mem::ManuallyDrop;

// This is a simple usage example. add_host_object_to_script is a mapping of the native [addHostObjectToScript](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2#addhostobjecttoscript) method of webview2. It requires manual creation of hostobject and memory management. Please use it with caution.
struct Variant(VARIANT);
impl Variant {
pub fn new(num: VARENUM, contents: VARIANT_0_0_0) -> Variant {
Expand Down

0 comments on commit 214b53b

Please sign in to comment.