title: How to correctly write new "event page" for chrome extensions?
body: <p>In new chrome extension API "background pages" was replaced with "event pages" that are loaded only one on extension install and need to register callback that will be called by chrome on some events.</p>
  
  <p>I want to create "event page" that will execute my code every second. I have created an extension with "manifest.json":</p>
  
  <pre><code>{
    "manifest_version" : 2,
    "name" : "myextension",
    "version" : "1.0.0",
    "background" : { "scripts" : [ "background.js" ], "persistent" : false }
  }
  </code></pre>
  
  <p>and "background.js":</p>
  
  <pre><code>function onTimer()
  {
    console.log( "on timer" );
  }
  
  function onStartup()
  {
    console.log( "on startup" );
    window.setInterval( onTimer, 1000 );
  }
  
  console.log( "script load" );
  chrome.runtime.onStartup.addListener( onStartup );
  </code></pre>
  
  <p>After i install extension, i can see "script load" in developer tools console, but not "on startup" and "on timer" :(. And after i close and reopen my browser, even "script load" is not display (that is expected). What am i doing wrong?</p>