Skip to content

ShowWebFrame

Shows a frame of the web interface.

The frame is made if it is not there yet (its page loads and OnWebFrameReady follows); a frame hidden with HideWebFrame is drawn again as it was, the same page with no reload. Showing a frame does not give it the keyboard or the mouse: that is SetWebFocus.

Returns true when the request was handed over, false and the reason when it could not be: "no web layer", "no web interface" or "no such frame".

ShowWebFrame(frame)
Parameter Type
frame string the frame’s name, as the interface’s ui.toml gives it

true, or false, reason - the reason as a person reads it

function OnKey(key, pressed)
if key == "f6" and pressed then
local ok, why = ShowWebFrame("map")
if not ok then print("map: " .. why) end
end
end

HideWebFrame · SetWebFocus · SetWebFrameZ · OnWebFrameReady · the Web interface group of the index