postMessage
Dispatches a typed message from native code to JavaScript listeners registered with window.wvbridge.addEventListener(type, listener).
On first use this installs the bridge post-message bootstrap script into the document-start hook list and evaluates it in the current page. values are then delivered to listeners as listener(...values) by calling window.wvbridge.dispatchEvent(type, ...values).
Only JSValue.Undefined, JSValue.Null, and JSValue.Serializable can be sent because the page-side value must be representable as undefined, null, or JSON.
Parameters
type
application-level packet type to dispatch.
values
payload values delivered to matching JavaScript listeners.