blckngm / webview2

Rust bindings for WebView2
MIT License
73 stars 12 forks source link

Update to WebView2 SDK 1.0.902.49 #16

Closed aditsachde closed 3 years ago

aditsachde commented 3 years ago

I've tried to update the SDK, as Tauri needs a newer SDK version for this PR: https://github.com/tauri-apps/wry/pull/280

I downloaded the SDK from nuget and removed files not present in the current SDK folder. However, I was not able to regenerate the bindings using idl2rs

I figured I'd open this draft anyways, as a starting point. Some help getting this working would be much appreciated.

cargo run < ../Microsoft.Web.WebView2.*/WebView2.idl > ../src/lib.rs && rustfmt ../src/lib.rs
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/idl2rs`
Parsing error:     --> 4357:7
     |
4357 |       [ in, size_is(originsCount) ] LPCWSTR * origins);␊
     |       ^---
     |
     = expected identifier
blckngm commented 3 years ago

I'm working on an update in #18.

blckngm commented 3 years ago

Getting/setting user_agent is supported now. See https://github.com/sopium/webview2/blob/d30fbb413b8e87f2f5e7f4601cfa4789b1f84f46/examples/user_agent.rs#L195