See EReadyState for more information.
function ShowInnerText()
{
var htmlBox = scene.getBoxById("myHtmlBox");
if (htmlBox)
{
if (htmlBox.readyState == 3)
{
var text = htmlBox.dom.body.innerText;
shell.print("Inner Text: " + text);
}
}
}