Closed Bug 860924 Opened 11 years ago Closed 11 years ago

Don't expose WebAPIs that don't work.

Categories

(Core :: DOM: Device Interfaces, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 838614

People

(Reporter: potch, Unassigned)

Details

Example: in Firefox Desktop, the navigator.vibrate() exists, but does nothing. To allow capability detection and enable fallbacks, navigator should not expose a `vibrate` if it will not work.

Normally, I could do the following:

if ('vibrate' in navigator) {
    navigator.vibrate(/*...*/);
} else {
    // fallback action
}

but due to this bug the second branch will not be reached.
Is this a duplicate of bug 838614 ?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.