pub unsafe extern "C" fn webview_dispatch(
w: webview_t,
fn_: Option<unsafe extern "C" fn(w: webview_t, arg: *mut c_void)>,
arg: *mut c_void,
) -> webview_error_tExpand description
Schedules a function to be invoked on the thread with the run/event loop.
Since library functions generally do not have thread safety guarantees, this function can be used to schedule code to execute on the main/GUI thread and thereby make that execution safe in multi-threaded applications.
@param w The webview instance. @param fn The function to be invoked. @param arg An optional argument passed along to the callback function.