Skip to content

DestroyWebFrame

Closes a frame of the web interface and frees the memory its page used.

A frame hidden with HideWebFrame stays alive - its page keeps running and keeps everything it loaded. A frame closed with this call is gone: its page ends, the memory it used is freed and it gives up the keyboard and the mouse. ShowWebFrame makes it again, its page loaded from the start (OnWebFrameReady follows once it listens). Close the screens the player opens once and hide the ones they open again and again. Closing a frame that is not open does nothing.

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".

DestroyWebFrame(frame)
Parameter Type
frame string the frame’s name

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

-- the page says it is finished: close it for good
function OnWebEvent(frame, name, data)
if frame == "intro" and name == "intro.done" then
DestroyWebFrame("intro")
end
end

HideWebFrame · ShowWebFrame · IsWebFrameReady · the Web interface group of the index