title: How to detect if a device has mouse support?
body: <p>I currently use the following test (taken out of Modernizr) to detect touch support:</p>
  
  <pre><code>function is_touch_device() {
      var bool;
      if(('ontouchstart' in window) || window.DocumentTouch &amp;&amp; document instanceof DocumentTouch) {
          bool = true;
      } else {
          injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function(node) {
              bool = node.offsetTop === 9;
          });
      }
      return bool;
  }
  </code></pre>
  
  <p>But some devices are both touch and mouse driven, so I want a seperate function to detect if a device has mouse support. What's a good way to do this check?</p>
  
  <p>Ultimately my intention is to be able to do these:</p>
  
  <pre><code>if(is_touch_device())
  
  if(has_mouse_support())
  
  if(is_touch_device() &amp;&amp; has_mouse_support())
  </code></pre>