title: IE10 d3.v3.js error: Unable to get property 'prototype' of undefined or null reference
body: <p>My page is loading perfectly in IE9, Safari, Chrome &amp; Firefox.</p>
  
  <p>But when it coems to IE10 , it throws error :
  <em>Unable to get property 'prototype' of undefined or null reference</em> 
  in <a href="http://d3js.org/d3.v3.js" rel="noreferrer">d3.v3.js</a>
  at line : d3_window.CSSStyleDeclaration.prototype.</p>
  
  <pre><code> try {
      d3_document.createElement("div").style.setProperty("opacity", 0, "");
    } catch (error) {
      var d3_style_prototype = d3_window.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
      d3_style_prototype.setProperty = function(name, value, priority) {
        d3_style_setProperty.call(this, name, value + "", priority);
      };
    }
  </code></pre>
  
  <p>I am not getting what exactly is being done here.</p>
  
  <p>In try block even though setProperty method we can see in debugger on <code>d3_document.createElement("div").style</code>
  it is throwing <em>error</em> as :
  <em>Object doesn't support property or method 'setProperty'</em></p>
  
  <p>In catch block it tries to access prototype of window's <code>CSSStyleDeclaration</code> , but that is undefined.</p>
  
  <p>Anybody occured with same problem while using <a href="http://d3js.org/d3.v3.js" rel="noreferrer">d3.v3.js</a></p>