OnClientBrowserWhitelistChange

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The event is triggered when the whitelist has changed. Note that this event is only triggered if the request window was confirmed by accepting.

[[{{{image}}}|link=|]] Note: Attaching the event to a webbrowser won't work. Attach it to the root element instead.

Parameters

table changedDomains
  • changedDomains: a table of changed domains.

Source

The root element.

Example

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

See Also