GetBrowserSettings: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (fix oop)
Line 10: Line 10:
table getBrowserSettings ()
table getBrowserSettings ()
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Element/Browser|Browser]].getSettings||getBrowserSettings}}
{{OOP||[[Element/Browser|Browser]].getSettings}}


==Returns==
==Returns==

Revision as of 20:22, 17 December 2015

Accessories-text-editor.png Script Example Missing Function GetBrowserSettings needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

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

This example is not tested

local window = guiCreateWindow(200, 200, 1024, 768, "Webbrowser", false)
local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false, window)

for k,v in pairs(getBrowserSettings(browser)) do
 outputChatBox("['"..tostring(k).."'] = '"..tostring(v))
end

See Also