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

Function

createBrowserWindow

ClientBrowserTrilogy Hub only

Creates a ready browser window: a control with mouse, wheel and keyboard input, loading the address after start-up, the cursor, keyboard focus and a control lock. Everything is released by destroyElement(window) or by stopping the resource.

Syntax

element, element createBrowserWindow(table options)

Arguments

optionstable
url (required), x, y, width, height (full screen by default), isLocal, transparent, cursor, focus, lockControls (true, a list of names or false), onReady(browser).

Returns

The window control and the browser.

Example

local wnd, browser = createBrowserWindow({ url = "ui/sklep.html", width = 900, height = 600 })
bindKey("backspace", "down", function()
    if isElement(wnd) then destroyElement(wnd) end
end)

See also