vibration.js 537 B

12345678910111213141516171819
  1. /*!
  2. {
  3. "name": "Vibration API",
  4. "property": "vibrate",
  5. "notes": [{
  6. "name": "MDN Docs",
  7. "href": "https://developer.mozilla.org/en/DOM/window.navigator.mozVibrate"
  8. },{
  9. "name": "W3C Spec",
  10. "href": "https://www.w3.org/TR/vibration/"
  11. }]
  12. }
  13. !*/
  14. /* DOC
  15. Detects support for the API that provides access to the vibration mechanism of the hosting device, to provide tactile feedback.
  16. */
  17. define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
  18. Modernizr.addTest('vibrate', !!prefixed('vibrate', navigator));
  19. });