File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/main/scala/org/scalajs/dom/experimental Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .scalajs .dom .experimental
2+
3+ import scalajs .js
4+
5+ /**
6+ * Implicit imports for the vibration api.
7+ *
8+ * http://www.w3.org/TR/2015/REC-vibration-20150210/
9+ */
10+ object Vibration {
11+ implicit class VibrationNavigator (val n : org.scalajs.dom.Navigator ) extends js.Any {
12+ /** Vibrate the device for the specified number of milliseconds. */
13+ def vibrate (duration : Double ): Boolean = js.native
14+
15+ /**
16+ * Vibrate the device in the given pattern.
17+ *
18+ * @param pattern the pattern to vibrate. The first number is the initial
19+ * duration, the subsequent a delay of silence, and so on.
20+ */
21+ def vibrate (pattern : js.Array [Double ]): Boolean = js.native
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments