docshell/test/file_bug669671.sjs
author Karl Tomlinson <karlt+@karlt.net>
Wed, 31 Oct 2012 15:54:06 +1300
changeset 111995 d7e77004a0d0dd5bd14c23ececf49c60c1231888
parent 72506 470cfda4dd83e6df5ea40ce283accb51e317afc8
permissions -rw-r--r--
b=797568 don't create a container just to reset it r=roc

function handleRequest(request, response)
{
  var count = parseInt(getState('count'));
  if (!count)
    count = 0;
  setState('count', count + 1 + '');

  response.setHeader('Content-Type', 'text/html', false);
  response.setHeader('Cache-Control', 'max-age=0');
  response.write('<html><body onload="opener.onChildLoad()" ' +
                 'onunload="parseInt(\'0\')">' +
                 count + '</body></html>');
}