Webview
self:emit
Client
Posts a message from Lua to the webview's JavaScript context
Syntax
local status = self:emit(input)Parameters
| Type | Name | Description |
|---|---|---|
string | input | Message string to post to the webview |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, or false on failure |
Examples
local browser = webview.create()
--Send a JSON payload to the webview
browser:emit('{"event":"ready","data":{"user":"aviril"}}')