ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. triggerBrowserEvent

Function

triggerBrowserEvent

ClientBrowserTrilogy Hub only

Sends an event from Lua to a local page. In JavaScript you receive it with trilogy.on("name", fn), without building code in a string.

Syntax

bool triggerBrowserEvent(browser webBrowser, string name, mixed ...)

Arguments

webBrowserbrowser
A local browser.
namestring
Event name.
...mixed
Data passed to the page.

Returns

true if the event was sent.

Example

addEventHandler("onClientPlayerWasted", localPlayer, function()
    triggerBrowserEvent(browser, "death", getPlayerName(localPlayer))
end)

See also