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

Function

loadBrowserURL

ClientBrowserIdentical to MTA:SA

Loads an address in the browser. A local browser opens resource files, a remote one opens pages from allowed domains.

Syntax

bool loadBrowserURL(browser webBrowser, string url [, string postData = "", bool urlEncoded = true])

Arguments

webBrowserbrowser
The browser.
urlstring
The address: http://trilogy/local/file.html, http://trilogy/<resource>/file or https://....
postDatastring, optional = ""
Data sent with POST.
urlEncodedbool, optional = true
Whether postData is form-encoded.

Returns

true if the address was accepted.

Example

addEventHandler("onClientBrowserCreated", browser, function()
    loadBrowserURL(source, "http://trilogy/local/html/hud.html")
end)

Notes

The page only sees <file> entries. The resource's script files are not available to the page.

See also