title: Javascript only works when with alerts
body: <p>The following code loads a youtube vidéo in a player.</p>
  
  <p>If I remove the two "alert", it doesn't work anymore...</p>
  
  <pre><code>ytplayer = document.getElementById("ytPlayer");
  alert('ok');
  if (ytplayer) {
      alert('ok');
      loadVideo(url, start);
  }
  </code></pre>
  
  <p>Can someone help me?</p>