![]() ![]() When you collapse the object you can view all the properties, including the 'chrome' property. Then you be able to view the DOM properties for the 'window object'. It's better to use feature object detection instead of browser detection.Īlso if you use the Google Chrome inspector and go to the console tab. Here is the link to the standalone jQuery plugin, since it has been removed from jQuery version 1.9.1. The reason being is that 'jQuery.browser' uses the user agent which can be spoofed and it is actually deprecated in later versions of jQuery. The jQuery API recommends to use jQuery.support. And states its functionality may be moved to a team-supported plugin in a future release of jQuery. But the jQuery API recommends against using this method. ![]() Var isIOSChrome = ("CriOS") Ībove posts advise to use jQuery.browser. Var isOpera = typeof window.opr != "undefined" and new IE Edge outputs to true now for window.chrome but needs to check if window.opr is not undefined and new Opera 30 outputs true for window.chrome that IE11 now returns undefined again for window.chrome Please try this: var isChromium = window.chrome īut a more complete and accurate answer would be this since IE11, IE Edge, and Opera will also return true for window.chrome This question was already discussed here: JavaScript: How to find out if the user browser is Chrome?
0 Comments
Leave a Reply. |