Disable broken vibration APIs
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
(Blocks 2 open bugs)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Currently our navigator.vibrate()
and Notification.vibrate
is being fully ignored, while we are still exposing the API. This is bad for feature detection and we should not expose non-working API.
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Comment 1•6 months ago
|
||
Assignee | ||
Comment 2•6 months ago
|
||
Chrome use counter of navigator.vibrate()
shows somewhere between 0.06 and 0.08%: https://chromestatus.com/metrics/feature/timeline/popularity/850
Quick check on the sampled list of most popular websites shows feature detection:
navigator.vibrate && navigator.vibrate()
(_18 = 'vibrate' in navigator && navigator.vibrate);
-
navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; if (navigator.vibrate) { navigator.vibrate([500]) }
-
( navigator.vibrate ? navigator.vibrate(500) : navigator.webkitVibrate && navigator.webkitVibrate(500) );
GitHub code search also shows frequent feature detection: https://github.com/search?q=navigator.vibrate+language%3AJavaScript&type=code&l=JavaScript
FWIW, it was removed from WebKit on 2017-05-05:
https://bugs.webkit.org/show_bug.cgi?id=171766
Comment 5•5 months ago
|
||
bugherder |
Comment 6•4 months ago
|
||
FF129 MDN docs work for this tracked in https://github.com/mdn/content/issues/34703 (essentially a compatibility data update and a release note).
Description
•