title: Chrome extension and history.onVisited event
body: <p>I'm new to the Chrome extensions development, and i have the following questions:
  My extension should work in background, with no UI, and show an alert dialog every time the user visits a specific web page. So it should work always, in backround, when the browser is executed.</p>
  
  <p>I was trying with the following code without results:</p>
  
  <p>manifest.json</p>
  
  <pre><code>{
    "name": "My First Extension",
    "version": "1.0",
    "description": "The first extension that I made.",
    "background_page": "background.html",
    "permissions": [
      "history"
    ]
  }
  </code></pre>
  
  <p>background.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
  chrome.history.onVisited.addListener(function(HistoryItem result) {
      if (result.url == "http://my.url.com") {
          alert("My message");
      }
  }); 
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What's wrong with this code?</p>
  
  <p>Thanks</p>