Skip to content

OnWebFrameReady

A frame’s page has loaded and is listening.

The page has called KcdMp.ready() (its script does it once the document has loaded, unless the page asked to do it by hand); from now on a message sent to it reaches it without any waiting. The callback runs again each time the frame’s page loads anew. A script that starts after a frame became ready is told about it once its files have run - for each frame that is ready - so the first thing a script does about a frame can always be done here.

function OnWebFrameReady(frame)
-- ...
end
Parameter Type
frame string the frame’s name

nothing

function OnWebFrameReady(frame)
if frame == "hud" then
SendWebMessage("hud", { hp = 100, stamina = 100 })
end
end

IsWebFrameReady · SendWebMessage · ShowWebFrame · OnWebEvent · the Web interface group of the index