title: jquery Cannot read property 'getAttribute' of undefined
body: <p>The javascript I'm using works completely fine in firefox and ie but has this error when run on chrome and safari. I'm not entirely sure why it's failing.</p>
  
  <pre><code>        var response = asyncResult.value;
          if (window.DOMParser) {
              var parser = new DOMParser();
              xmlDoc = parser.parseFromString(response, "text/xml");
  
          }
          else 
          {
              xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
              xmlDoc.async = false;
              xmlDoc.loadXML(response);
          }
  
          console.log(xmlDoc);
           var changeKey = xmlDoc.getElementsById("t:ItemId")[0].getAttribute("ChangeKey");
  </code></pre>
  
  <p>The console shows this message but outputs the xmlDoc just fine when I have it set to console.log()</p>
  
  <hr>
  
  <pre><code>Uncaught TypeError: Cannot read property 'getAttribute' of undefined        r.js 
  soapToGetItemDataCallback    r.js
  r.onreadystatechange    outlookwebapp-15.js:21 
  $h.EwsRequest.$1x_1    outlookwebapp-15.js:21 
  (anonymous function)   outlookwebapp-15.js:21
  </code></pre>