pub unsafe fn make_new_handler<Func>(name: &str, func: *mut Func) -> idwhere
    Func: FnMut(id, id),
Expand description

Wraps a callback of type FnMut(id /* WKUserContentController */, id /* WKScriptMessage */) so it can be registered onto the WKUserContentController with WKUserContentController::addScriptMessageHandler.

Safety

All the FFI functions are unsafe.

Your callback will be called from WebKit. If the WebView outlives it: 💥.