title: JavaScript Tree issue on Internet Explorer
body: <p>I need some help with my JavaScript. My JavaScript code is not working on Internet Explorer 8, it gives a blank display,and some error code, on ie console, please suggest me some solution to get this JavaScript code working on Internet Explorer. The following is the link for the fiddle:</p>
  
  <p><a href="http://jsfiddle.net/aliparvez20/Ek2xS/47/" rel="nofollow">Fiddle</a></p>
  
  <hr>
  
  <p>Error Code</p>
  
  <p>SCRIPT438: Object doesn't support property or method 'keys'
     File: treelist.js, Line: 12, Column: 13</p>
  
  <hr>
  
  <pre><code>var dataSource = {
              "Watch": {
                  "Titan": {},
                  "parent": {
                      "leaf1": {},
                      "leaf2": {}
                  },
              }
          },
      traverseObject = function (obj) {
          var ul = document.createElement("ul"),
              li;
  
          for (var prop in obj) {
              li = document.createElement("li");
              li.appendChild(document.createTextNode(prop));
              li.onclick = function(e) {
                  var classNames = e.currentTarget.className;
                  if (classNames.indexOf("hidden") == -1) {
                      e.currentTarget.className += "hidden";
                  } else {
                      e.currentTarget.className = e.currentTarget.className.replace("hidden", "");
                  }
                  e.stopPropagation();
              }
  
              if (typeof obj[prop] == "object" &amp;&amp; Object.keys(obj[prop]).length) {
                  li.appendChild(traverseObject(obj[prop]));
              } else {
                  li.className += "leaf";
              }
              ul.appendChild(li);
              console.log(ul);
          }
          return ul;
      };
  
  
  window.onload = function () {
      document.getElementById("dvList1").appendChild(traverseObject(dataSource));
  }
  </code></pre>