title: Use of getPreventDefault() is deprecated. Use defaultPrevented instead
body: <p>I want to Print receipt page on loading page in firefox</p>
  
  <p>Firefox shows following error..</p>
  
  <p>Use of <code>getPreventDefault()</code> is deprecated. Use defaultPrevented instead.
  error source line:</p>
  
  <pre><code>src.getPreventDefault &amp;&amp; src.getPreventDefault() ) ? returnTrue : returnFalse;
  </code></pre>
  
  <blockquote>
    <p>NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111
    (NS_ERROR_NOT_AVAILABLE) [nsIDOMWindow.print] error source line:</p>
  </blockquote>
  
  <hr>
  
  <pre><code>print();
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>$(document).ready(function() {
      print_doc();
      $("#Submit").click(function() {
          $("#goBack").hide();
          $("#printRow").hide();
          print();
          $("#goBack").show();
          $("#printRow").show();
      });
  });
  
  function print_doc() {
      $("#goBack").hide();
      $("#printRow").hide();
      print();
      $("#goBack").show();
      $("#printRow").show();
  }
  </code></pre>
  
  <p>I want to print my receipt before showing "goBack", and "printRow" id's but not working</p>