self:set_visible

Client

Toggles the visibility of the webview


Syntax

local status = self:set_visible(
    state
)

Parameters

TypeNameDescription
boolstateDetermines the webview's visibility:
• When true - the webview is shown
• When false - the webview is hidden

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Toggle the visibility of a webview
local wv = webview.create()

-- Show the webview
wv:set_visible(true)

-- Hide the webview
wv:set_visible(false)

On this page