blob: 0c7063f1e02a858dc284c2e589f0e3730953f050 [file] [log] [blame]
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:401<!DOCTYPE html>
Zhiqiang Zhang2f202f42014-06-24 14:28:532<html>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:403 <head>
4 <meta charset='utf-8'/>
5 <title>Vibration API: test a pattern array parameter to vibrate()</title>
6 <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/>
7 <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/>
Zhiqiang Zhang2f202f42014-06-24 14:28:538 <meta name='flags' content='dom, interact'/>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:409 </head>
10 <body>
11 <h1>Description</h1>
12 <p>
13 After hitting the button below, your device must vibrate three times for one second, separated
14 by one second intervals.
15 </p>
16 <button id='vib'>Vibrate!</button>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4017 <script>
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:2018 if (undefined !== navigator.vibrate) {
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4019 document.getElementById("vib").onclick = function () {
20 navigator.vibrate([1000, 1000, 1000, 1000, 1000]);
21 };
22 }
23 </script>
24 </body>
25</html>