/// Create a wrapper around a webkit.
///
/// # Safety
/// Unsafe due to FFI.
Create a wrapper around a webkit.
Create a wrapper around a webkit .
pub unsafe fn new(size: (i32, i32)) -> WebviewHolder {
        let origin = NSPoint::new(0.0, 0.0);
        let (width, height) = size;
        let size = NSSize::new(width as f64, height as f64);
        let frame = NSRect::new(origin, size);
        let webview = DarwinWKWebView::new(frame);
        WebviewHolder {
            webview,
            on_message_callback: None,
            id: 1234,
        }
    }
pub unsafe fn new ( size : ( i32 , i32 ) ) -> WebviewHolder { let origin = NSPoint :: new ( 0.0 , 0.0 ) ; let ( width , height ) = size ; let size = NSSize :: new ( width as f64 , height as f64 ) ; let frame = NSRect :: new ( origin , size ) ; let webview = DarwinWKWebView :: new ( frame ) ; WebviewHolder { webview , on_message_callback : None , id : 1234 , } }
Create a wrapper around a webkit.
Create a wrapper around a webkit .
size
(i32, i32)
safety
Unsafe due to FFI.
Unsafe due to FFI .