title: Always get null value from iterateNext() for document.evaluate
body: <p>When use code below in script always get null for e</p>
  
  <pre><code>var e = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE, null).iterateNext();
  </code></pre>
  
  <p>But use this command in Chrome console, e could get correct value, why this happens?</p>
  
  <p>Here are full code of js file and html file</p>
  
  <p>test.js</p>
  
  <pre><code>function testClick(xpath){
  var e = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE, null).iterateNext();
  // var a = e.iterateNext();
  if(document.createEvent){
      var event = document.createEvent('MouseEvents');
      event.initEvent('click', true, false);
      e.dispatchEvent(event);
  }
  else if(document.createEventObject){
      e.fireEvent('onclick');
  }
  }
  
  
  var xpath = "(//a[@href='./detail.html'])[1]";
  setTimeout(testClick(xpath), 3000);
  </code></pre>
  
  <p>html</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="../js/test.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;ul&gt;
          &lt;li class="carmen-li"&gt;&lt;a href="./detail.html"&gt;1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="./detail.html"&gt;2&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="./detail.html"&gt;3&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>