self:set_devtools_visible

Client

Toggles the developer tools panel on the webview


Syntax

local status = self:set_devtools_visible(
    state
)

Parameters

TypeNameDescription
boolstateDetermines the devtools visibility:
• When true - the devtools panel is opened
• When false - the devtools panel is closed

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Toggle devtools's visibility on a webview
local wv = webview.create()

-- Open devtools
wv:set_devtools_visible(true)

-- Close devtools
wv:set_devtools_visible(false)

On this page