/// Create a webview with the given frame rect. Also creates the supporting configuration and
/// content controller.
///
/// Thee view is resizable other options are empty.
///
/// # Safety
/// All the FFI functions are unsafe.
Create a webview with the given frame rect. Also creates the supporting configuration and
content controller.

Thee view is resizable other options are empty.
Create a webview with the given frame rect . Also creates the supporting configuration and content controller . Thee view is resizable other options are empty .
pub unsafe fn new(frame: NSRect) -> DarwinWKWebView {
        let configuration = WKWebViewConfiguration::init(WKWebViewConfiguration::alloc(nil));
        let content_controller = WKUserContentController::init(WKUserContentController::alloc(nil));
        configuration.setUserContentController(content_controller);
        let webview = WKWebView::alloc(nil).initWithFrame_configuration_(frame, configuration);
        NSView::setAutoresizingMask_(webview, NSViewWidthSizable | NSViewHeightSizable);
        DarwinWKWebView {
            webview,
            configuration,
            content_controller,
        }
    }
pub unsafe fn new ( frame : NSRect ) -> DarwinWKWebView { let configuration = WKWebViewConfiguration :: init ( WKWebViewConfiguration :: alloc ( nil ) ) ; let content_controller = WKUserContentController :: init ( WKUserContentController :: alloc ( nil ) ) ; configuration . setUserContentController ( content_controller ) ; let webview = WKWebView :: alloc ( nil ) . initWithFrame_configuration_ ( frame , configuration ) ; NSView :: setAutoresizingMask_ ( webview , NSViewWidthSizable | NSViewHeightSizable ) ; DarwinWKWebView { webview , configuration , content_controller , } }
Create a webview with the given frame rect.
Create a webview with the given frame rect .
frame
NSRect
safety
All the FFI functions are unsafe.
All the FFI functions are unsafe .