Webview.visible read/write property


Get or set the Webview visibility on screen, a true value means that the Webview is shown, a false value means that the Webview is hidden.

Example

local ui = require "ui" require "webview" -- create a simple Webview local win = ui.Window("Webview.visible sample", 640, 480) local Webview = ui.Webview(win, "https://www.google.com", 0, 50, 640, 430) local button = ui.Button(win, "Click to hide Webview for 2sec") button:center() button.y = 10 -- hides the Webview and shows it again after 2 sec function button:onClick() Webview.visible = false button.enabled = false sleep(2000) button.enabled = true Webview.visible = true end ui.run(win):wait()