title: How to get browser "Document Mode"
body: <p>I am developing some kind of JavaScript library. And i cause the problem that i have some specific issues for:
  Browser : IE8 / IE9 and Document Mode : IE7
  I found the solution, but i don't want to use it in all situation, and want to use it just when i have the situation described above. I know that I can recognize browser by using:</p>
  
  <pre><code>return navigator.userAgent.toLowerCase().indexOf('MSIE 8') &gt; -1;
  </code></pre>
  
  <p>But i recognize just browser version in such way but not the document mode, and i don't want to use my solution when I have, for example, browser mode IE8 and document mode IE 8. 
  Is there a way to get page document mode in IE? Thanks in advance.</p>