ToggleBrowserDevTools: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (add oop variable)
Line 19: Line 19:


==Example==
==Example==
{{Example}}
This example will output browser console logs to debugscript.
<syntaxhighlight lang="lua">
local GUI_browser = guiCreateBrowser(100,100,640,480,false,false,false) -- Create Browser
local browser = guiGetBrowser(GUI_browser) -- Get browser from GUI element
 
setDevelopmentMode(false,true) -- Enable client dev.mode
toggleBrowserDevTools(browser,true) -- Its a magic =\
</syntaxhighlight>


==See also==
==See also==
{{CEF_functions}}
{{CEF_functions}}

Revision as of 13:03, 16 November 2016

This function toggles the visibility of the developer tools pane.

Syntax

bool toggleBrowserDevTools ( browser webBrowser, bool visible )

OOP Syntax Help! I don't understand this!

Method: browser:toggleBrowserDevTools(...)
Variable: .devTools


Required Arguments

  • webBrowser: The browser
  • visible: true to show the tools, false to hide

Returns

Returns true if the visibility was successfully toggled, false if an error occurred

Example

This example will output browser console logs to debugscript.

local GUI_browser = guiCreateBrowser(100,100,640,480,false,false,false) -- Create Browser
local browser = guiGetBrowser(GUI_browser) -- Get browser from GUI element

setDevelopmentMode(false,true) -- Enable client dev.mode
toggleBrowserDevTools(browser,true) -- Its a magic =\

See also