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.
Syntax
Section titled “Syntax”function OnWebFrameReady(frame) -- ...end| Parameter | Type | |
|---|---|---|
frame |
string | the frame’s name |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnWebFrameReady(frame) if frame == "hud" then SendWebMessage("hud", { hp = 100, stamina = 100 }) endendSee also
Section titled “See also”IsWebFrameReady · SendWebMessage · ShowWebFrame · OnWebEvent · the Web interface group of the index
