How to check the feature is available in HTML attributes? - Browser Support

0 votes
asked May 21, 2016 in HTML5 by admin (8,135 points)
Hi All,

   I want to know whether the feature or functionality is available or not in the HTML attributes. For an example the "orientation" functionality is not available in screen(Safari).

Thanks in advance

1 Answer

0 votes
answered May 24, 2016 by Kadhir


  You can try the following piece of code

 if ("orientation" in window.screen){
     console.log("Orientation feature available ")
     console.log("Orientation feature not  available ")