WebAPI/Navigator.hasFeature: Difference between revisions

Jump to navigation Jump to search
Line 64: Line 64:
The second example checks to see if the privileged FM Radio API is available.
The second example checks to see if the privileged FM Radio API is available.


   navigator.hasFeature("api.window.Navigator.mozFMRadio").then(enabled) {
   navigator.hasFeature("api.window.Navigator.mozFMRadio").then(function(enabled) {
     if (enabled) {
     if (enabled) {
       alert("FM Radio support detected, my privileged app will work!");
       alert("FM Radio support detected, my privileged app will work!");
     }
     }
   });
   });
Confirmed users
657

edits

Navigation menu