title: Register DOMContentLoaded in Google Chrome
body: <p>In Firefox and Safari i managed to register the DOMContentLoaded event with <strong>window.addEventListener('DOMContentLoaded', PageShowHandler, false);</strong> by inserting this statement into the js script that gets inserted, or more clearly, get executed after the dom of the page is loaded, my specific functions managed to run at every time the DOM of this specific page was loaded. </p>
  
  <p>I can't seem to do this in Chrome. I made some trick with the <strong>chrome.tabs.onUpdated</strong> et al events but it doesn't work in every instance; all these events don't add up to what the DOMContentLoaded achieves. For example when i click on specific links on my webpage this doesn't inject my code as my DOMContentLoaded event could have done. </p>
  
  <pre><code>window.addEventListener('DOMContentLoaded', PageShowHandler, false);
  </code></pre>
  
  <p>introduced into <strong>inject.js</strong> doesn't seem to register the event.</p>
  
  <p>This is the manifest:</p>
  
  <pre><code>{
  "name" : "gMail Adder ",
  "version" : "1.0",
  "description" : "Google Chrome Gmail Adder",
  "options_page": "options.html",
  "background_page": "background.html",
  "run_at": "document_start",
  "permissions": [
     "tabs",
     "history",
     "http://*/*",
     "https://*/*"
  ],
  "content_scripts": [
    {
     "matches": ["*://*.google.mail.com/*", "https://*.google.mail.com/*"     ,"http://mail.google.com/*" ,"https://mail.google.com/*", "https://www.google.com/*", "http://www.google.com/*", "file:///*"],
     "css": ["toggle.css"],
     "js": ["jquery-1.4.4.min.js", "inject.js"]
    }
  ],
  "browser_action" : {
  "default_icon" : "Quest Icon 11.png",
  "default_popup": "popup.html"
  }
  }
  </code></pre>