title: getElementById in chrome extension
body: <p>I have written a code for extension but it doesn't work: I can't getElementById in document nor in extension popup. I would like when I click popup text extension starts the game.
  HTML CODE;</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt; 
  
  &lt;style&gt; p {color: purple;} &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p id="pocinje"&gt; Ekstenzija je pokrenuta i ceka se vrijeme za pocetak. &lt;/p&gt;
  &lt;script src="background.js"&gt; &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>JAVASCRIPT;</p>
  
  <pre><code>document.getElementById("pocinje").onclick= function() {open};
  
  function open() {
  document.getElementById("startNewGame").click();
  
  console.log("alorka");
  
  }
  </code></pre>
  
  <p>How can I fix this?</p>