codice:
function checkText() {
  if (<elemento>.innerHTML == '') {
      setTimeout('checkText()', 500);
      return;
  }

  // resto della funzione se nell'elemento è presente un testo

}



<elemento>.innerHTML = 'testo';
checkText();
Ciao