RequestBrowserDomains: Difference between revisions
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">requestBrowserDomains({ "mtasa.com" }) | <syntaxhighlight lang="lua">requestBrowserDomains({ "mtasa.com" }) -- request browser domain | ||
showCursor(true) | showCursor(true) -- show cursor | ||
addEventHandler("onClientBrowserRequestsChange", root, | addEventHandler("onClientBrowserRequestsChange", root, | ||
function() | function(newDomains) | ||
if | if newDomains[1] == "mtasa.com" then | ||
browser = createBrowser(1280, 720, false, false) | local browser = createBrowser(1280, 720, false, false) -- create browser | ||
loadBrowserURL(browser, "http://mtasa.com/") | loadBrowserURL(browser, "http://mtasa.com/") -- load browser url | ||
end | end | ||
end | end |
Revision as of 15:43, 2 May 2015
This function opens a request window in order to accept the requested remote URLs.
Syntax
bool requestBrowserDomains ( table pages )
OOP Syntax Help! I don't understand this!
- Method: browser.requestDomains(...)
- Counterpart: requestBrowserDomains
Required arguments
- pages: A table containing all domains (without http://)
Returns
Returns true, if the string was successfully read, false otherwise.
Example
requestBrowserDomains({ "mtasa.com" }) -- request browser domain showCursor(true) -- show cursor addEventHandler("onClientBrowserRequestsChange", 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
- canBrowserNavigateBack
- canBrowserNavigateForward
- createBrowser
- executeBrowserJavascript
- focusBrowser
- getBrowserProperty
- getBrowserSettings
- getBrowserSource
- getBrowserTitle
- getBrowserURL
- injectBrowserMouseDown
- injectBrowserMouseMove
- injectBrowserMouseUp
- injectBrowserMouseWheel
- isBrowserDomainBlocked
- isBrowserFocused
- isBrowserLoading
- isBrowserRenderingPaused
- loadBrowserURL
- navigateBrowserBack
- navigateBrowserForward
- reloadBrowserPage
- requestBrowserDomains
- resizeBrowser
- setBrowserAjaxHandler
- setBrowserProperty
- setBrowserRenderingPaused
- setBrowserVolume
- toggleBrowserDevTools