title: Chrome content scripts aren't working: DOMContentLoaded listener does not execute
body: <p>I am trying to code extension that corrects misspellings on 1 forum.</p>
  
  <p>I am trying to access <code>&lt;p&gt;</code> tag, with content script, but it doesn't change anything (using the code below):</p>
  
  <pre class="lang-js prettyprint-override"><code>document.addEventListener("DOMContentLoaded", function() {
      document.getElementsByTagName("P")[4].innerHTML = "correct_word"; 
  }); 
  </code></pre>
  
  <p>It doesn't change anything when added as an extension, apparently if I <code>wget</code> the page, and put the script there, all works. Any thoughts?</p>
  
  <p>My <em>manifest.json</em> file:</p>
  
  <pre class="lang-json prettyprint-override"><code>{
      "manifest_version": 2,
      "name": "Extension",
      "description": "Description",
      "version": "1.0",
      "content_scripts": [{
          "run_at": "document_end",
          "matches": ["http://example.com/"],
          "js": ["script.js"]
      }],
      "web_accessible_resources": ["Filedeleted(really).html"]
  }
  </code></pre>
  
  <p>I know content scripts and WWW pages have different sandboxes, maybe content script can't access page (and tag)?</p>