pub trait WKUserContentController: Sized {
// Required methods
unsafe fn init(self) -> id;
unsafe fn addScriptMessageHandler(self, message_handler: id, name: id) -> id;
// Provided method
unsafe fn alloc(_: Self) -> id { ... }
}
All the FFI functions are unsafe.
All the FFI functions are unsafe.
message_handler
should be a WKScriptMessageHandler
and name
an NSString
.
make_new_handler
is provided to create WKScriptMessageHandler
s from closures, but it’s
also not safe.
All the FFI functions are unsafe.