webview_dispatch

public final Unit webview_dispatch(    CPointer<? extends CPointed> w,     CPointer<CFunction<Function2<CPointer<? extends CPointed>, CPointer<? extends CPointed>, Unit>>> fn,     CValuesRef<?> args)

Posts a function to be executed on the main thread.

It safely schedules the callback to be run on the main thread on the next main loop iteration. You normally do not need to call this function, unless you want to tweak the native window.

Parameters

w

the handle of webview, usually returned by webview_create

fn

the callback

args

the arguments for fn