blob: 4a85bd6ad05c8f238d03a361c6e457f5166f8301 [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!DOCTYPE html>
2<html>
3 <head>
4 <meta charset='utf-8'/>
5 <title>Vibration API: test a simple 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'/>
8 </head>
9 <body>
10 <h1>Description</h1>
11 <p>
12 After hitting the button below, your device must vibrate continuously for about two seconds, once.
13 </p>
14 <button id='vib'>Vibrate!</button>
15 <div id='log'></div>
16 <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script>
17 <script>
18 document.getElementById("vib").onclick = function () {
19 navigator.vibrate([2000]);
20 };
21 </script>
22 </body>
23</html>