GetBrowserSettings: Difference between revisions
Jump to navigation
Jump to search
m (fix oop) |
|||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{New feature/item|3.0150|1.5|| | {{New feature/item|3.0150|1.5|| | ||
This function returns a table containing the browser settings. | This function returns a table containing the browser settings. | ||
Line 19: | Line 18: | ||
==Example== | ==Example== | ||
This | <section name="Example" class="client" show="true"> | ||
This creates a browser and get the browser settings when the browser has been created | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
window = guiCreateWindow(377, 156, 671, 454, "", false) | |||
guiWindowSetSizable(window, true) | |||
for k,v in pairs(getBrowserSettings( | webBrowser = guiCreateBrowser(9, 26, 652, 418, false, false, false, window) | ||
local theBrowser = guiGetBrowser(webBrowser) | |||
addEventHandler("onClientBrowserCreated", theBrowser, function() | |||
showCursor(true) | |||
loadBrowserURL(source, "http://google.com\\") | |||
for k,v in pairs(getBrowserSettings(theBrowser)) do | |||
outputChatBox("['"..tostring(k).."'] = "..tostring(v)) | |||
end | |||
end | end | ||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{CEF_functions}} | {{CEF_functions}} | ||
[[hu:getBrowserSettings]] | |||
[[RO:getBrowserSettings]] |
Latest revision as of 18:11, 8 June 2020
This function returns a table containing the browser settings.
Syntax
table getBrowserSettings ()
OOP Syntax Help! I don't understand this!
- Method: Browser.getSettings(...)
Returns
A table having the following keys:
- RemoteEnabled: true if remote websites are enabled, false otherwise
- RemoteJavascript: true if Javascript is enabled on remote websites, false otherwise
- PluginsEnabled: true if plugins such as Flash, Silverlight (but not Java) are enabled, false otherwise. This setting is false by default.
Example
Click to collapse [-]
ExampleThis creates a browser and get the browser settings when the browser has been created
window = guiCreateWindow(377, 156, 671, 454, "", false) guiWindowSetSizable(window, true) webBrowser = guiCreateBrowser(9, 26, 652, 418, false, false, false, window) local theBrowser = guiGetBrowser(webBrowser) addEventHandler("onClientBrowserCreated", theBrowser, function() showCursor(true) loadBrowserURL(source, "http://google.com\\") for k,v in pairs(getBrowserSettings(theBrowser)) do outputChatBox("['"..tostring(k).."'] = "..tostring(v)) 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