api.Navigator.vibrate

Spec

MDN URL

Status

On the standards track: Yes

Is Experimental: No

Is Deprecated: No

Browser Support

In Chrome version 32 on 2014-01-14

In Chrome Android version 32 on 2014-01-15 Note: Beginning in Chrome 55, this is not supported in cross-origin iframes. Beginning in Chrome 60, this method requires a user gesture. Otherwise it returns false.

In Edge version 79 on 2020-01-15

In Firefox version 16 on 2012-10-09 Note: Until Firefox 26 included, when the vibration pattern was too long or any of its elements too large, Firefox threw an exception instead of returning false (bug 884935). From Firefox 32 onwards, when the vibration pattern is too long or any of its elements too large, it returns true but truncates the pattern (bug 1014581). Beginning in Firefox 72, this is not supported in cross-origin iframes. Removed from Firefox version 129 on 2024-08-06

In Firefox for Android version 79 on 2020-07-28 Note: Vibration is disabled. If the window is visible, then navigator.vibrate() returns true, but no vibration takes place (regardless of hardware support). Originally, the intent was to disable it for cross-origin frames only (bug 1591113), but the feature was not re-enabled due to abuse concerns (bug 1653318). Until Firefox 26 included, when the vibration pattern was too long or any of its elements too large, Firefox threw an exception instead of returning false (bug 884935). From Firefox 32 onwards, when the vibration pattern is too long or any of its elements too large, it returns true but truncates the pattern (bug 1014581).

Not in Internet Explorer

Not in Node.js

In Quest Browser version 5.0 on undefined Note: Beginning in Chrome 55, this is not supported in cross-origin iframes. Beginning in Chrome 60, this method requires a user gesture. Otherwise it returns false.

In Opera version 19 on 2014-01-28

In Opera Android version 19 on 2014-01-28 Note: Beginning in Opera 42, this is not supported in cross-origin iframes. Beginning in Opera 47, this method requires a user gesture. Otherwise it returns false.

Not in Safari

Not in Safari on iOS

In Samsung Internet version 2.0 on 2014-10-17 Note: Beginning in Chrome 55, this is not supported in cross-origin iframes. Beginning in Chrome 60, this method requires a user gesture. Otherwise it returns false.

In WebView Android version 4.4.3 on 2014-06-02 Note: Beginning in version 55, this is not supported in cross-origin iframes. Beginning in version 60, this method requires a user gesture. Otherwise it returns false.

Not in WebView on iOS