Created
November 18, 2015 15:21
-
-
Save cverbiest/e3a69f7bd5f217cb54ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
TestVibrate() | |
{ | |
navigator.vibrate = navigator.vibrate || | |
navigator.webkitVibrate || | |
navigator.mozVibrate || | |
navigator.msVibrate; | |
if (navigator.vibrate) { | |
console.log('we can vibrate'); | |
} else { | |
console.log('no vibration for you :-('); | |
} | |
} | |
</script> | |
</head> | |
<body Onload="TestVibrate()" > | |
Test | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment