HU/toggleBrowserDevTools: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0150|1.5|| This function toggles the visibility of the developer tools pane. }} ==Syntax== <syntaxhighlight lang="lua"> boo...")
 
Line 32: Line 32:


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


[[en:toggleBrowserDevTools]]
[[en:toggleBrowserDevTools]]
==Fordította==
* '''''Surge'''''

Revision as of 15:27, 11 August 2018

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:toggleDevTools(...)
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(true, true) -- Enable client dev mode

addEventHandler("onClientBrowserCreated", browser, function()
    toggleBrowserDevTools(browser, true) -- Toggle the CEF dev console
end)

See also

GUI Függvények

Fordította

  • Surge