File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " wry " : minor
3+ ---
4+
5+ On Windows, Add ` WebViewExtWindows::hwnd ` getter to access the child HWND containing the webview.
Original file line number Diff line number Diff line change @@ -2255,6 +2255,9 @@ pub trait WebViewExtWindows {
22552255
22562256 /// Attaches this webview to the given HWND and removes it from the current one.
22572257 fn reparent ( & self , hwnd : isize ) -> Result < ( ) > ;
2258+
2259+ /// Returns the child HWND hosting this webview.
2260+ fn hwnd ( & self ) -> windows:: Win32 :: Foundation :: HWND ;
22582261}
22592262
22602263#[ cfg( target_os = "windows" ) ]
@@ -2282,6 +2285,11 @@ impl WebViewExtWindows for WebView {
22822285 fn reparent ( & self , hwnd : isize ) -> Result < ( ) > {
22832286 self . webview . reparent ( hwnd)
22842287 }
2288+
2289+ /// Returns the child HWND hosting this webview.
2290+ fn hwnd ( & self ) -> windows:: Win32 :: Foundation :: HWND {
2291+ self . webview . hwnd ( )
2292+ }
22852293}
22862294
22872295/// Additional methods on `WebView` that are specific to Linux.
Original file line number Diff line number Diff line change @@ -1372,6 +1372,11 @@ impl InnerWebView {
13721372 & self . id
13731373 }
13741374
1375+ #[ inline]
1376+ pub fn hwnd ( & self ) -> HWND {
1377+ self . hwnd
1378+ }
1379+
13751380 pub fn eval (
13761381 & self ,
13771382 js : & str ,
You can’t perform that action at this time.
0 commit comments