| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 1 | <!DOCTYPE html> |
| Zhiqiang Zhang | 2f202f4 | 2014-06-24 14:28:53 | [diff] [blame] | 2 | <html> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 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'/> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 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> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 16 | <script> |
| Zhiqiang Zhang | 1fde24c | 2014-11-18 03:00:25 | [diff] [blame] | 17 | document.getElementById("vib").onclick = function () { |
| 18 | navigator.vibrate([2000]); |
| 19 | }; |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 20 | </script> |
| 21 | </body> |
| 22 | </html> |