From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function opens a request window in order to accept the requested remote URLs.

[[{{{image}}}|link=|]] Note: You must use this function prior to calling loadBrowserURL because every domain, with exceptions in the whitelist here and there, is blocked by default.


bool requestBrowserDomains ( table pages [, bool parseAsURL = false, function callback ] )

OOP Syntax Help! I don't understand this!

Method: Browser.requestDomains(...)

Required Arguments

  • pages: A table containing all domains

Optional Arguments

  • parseAsURL: true if the passed addresses should be converted from URLs, false otherwise.
  • callback: A callback function that is called as soon as the result is available


function(bool wasAccepted, table new_domains)


Returns true, if the string was successfully read, false otherwise.


requestBrowserDomains({ "" }) -- request browser domain
showCursor(true) -- show cursor
addEventHandler("onClientBrowserWhitelistChange", root,
     if newDomains[1] == "" then
       local browser = createBrowser(1280, 720, false, false) -- create browser
       loadBrowserURL(browser, "") -- load browser url

See also

* FEATURE ADDED IN 1.5.9 (BETA: 1.5.8 r20806):

GUI Functions