webview: Public the raw wry webview handle (#1739)
This commit is contained in:
parent
514aea00be
commit
13eceab1ac
1 changed files with 9 additions and 4 deletions
|
|
@ -1,14 +1,14 @@
|
|||
use std::{ops::Deref, rc::Rc};
|
||||
|
||||
use wry::{
|
||||
dpi::{self, LogicalSize},
|
||||
Rect,
|
||||
dpi::{self, LogicalSize},
|
||||
};
|
||||
|
||||
use gpui::{
|
||||
canvas, div, App, Bounds, ContentMask, DismissEvent, Element, ElementId, Entity, EventEmitter,
|
||||
FocusHandle, Focusable, GlobalElementId, Hitbox, InteractiveElement, IntoElement, LayoutId,
|
||||
MouseDownEvent, ParentElement as _, Pixels, Render, Size, Style, Styled as _, Window,
|
||||
App, Bounds, ContentMask, DismissEvent, Element, ElementId, Entity, EventEmitter, FocusHandle,
|
||||
Focusable, GlobalElementId, Hitbox, InteractiveElement, IntoElement, LayoutId, MouseDownEvent,
|
||||
ParentElement as _, Pixels, Render, Size, Style, Styled as _, Window, canvas, div,
|
||||
};
|
||||
|
||||
use crate::PixelsExt;
|
||||
|
|
@ -74,6 +74,11 @@ impl WebView {
|
|||
pub fn load_url(&mut self, url: &str) {
|
||||
self.webview.load_url(url).unwrap();
|
||||
}
|
||||
|
||||
/// Get the raw wry webview.
|
||||
pub fn raw(&self) -> &wry::WebView {
|
||||
&self.webview
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for WebView {
|
||||
|
|
|
|||
Loading…
Reference in a new issue