pattern-array-with-0-manual.html (693B)
1 <!DOCTYPE html> 2 <meta charset='utf-8'> 3 <title>Vibration API: test a pattern array with 0ms vibration and still to vibrate()</title> 4 <link rel='author' title='Intel' href='http://www.intel.com'> 5 <link rel='help' href='http://dev.w3.org/2009/dap/vibration/#vibration-interface'> 6 <meta name='flags' content='interact'> 7 <style> 8 button { 9 height: 100px; 10 width: 100px; 11 } 12 </style> 13 14 <h1>Description</h1> 15 <p> 16 After hitting the button below, your device must vibrate continuously for about two seconds, once. 17 </p> 18 <button id='vib'>Vibrate!</button> 19 <div id='log'></div> 20 <script> 21 document.getElementById("vib").onclick = function () { 22 navigator.vibrate([0, 0, 2000]); 23 }; 24 </script>