Questions tagged [browser-feature-detection]

Feature detection is the practice in web development of determining whether a browser or device supports a certain feature, so as to provide fallbacks for older browsers or allow enhanced functionality in more capable modern browsers.

Feature detection is the practice in web development of determining whether a browser or device supports a certain feature, so as to provide fallbacks for older browsers or allow enhanced functionality in more capable modern browsers.

160 questions
0
votes
1 answer

How to detect whether browser supports :invalid pseudoclass?

I tried to use Modernizr, but it seems not to support this feature detection. I also read that it is difficult or even inmpossible to access pseudoclasses from javascript, because they are not part of DOM. So, after surfing the web I found no…
0
votes
0 answers

Detect ability to place phone calls with javascript from browser

Does anyone know if there is a way to detect the ability to make phone calls from a browser/webpage? I don't necessarily want to know if I'm dealing with a touchscreen or smaller viewport, but rather if the device or browser has the ability to make…
Thierry Blais
  • 2,848
  • 22
  • 41
0
votes
1 answer

Selecting external CSS file using JS

I want to select a CSS file using a variable from a piece of JS. I'm working on feature detecting to select a specific CSS. Here is the code I'm using to determine the resolution of a screen. I would like to use either "RES" or "device" to select an…
user3743202
  • 31
  • 1
  • 3
0
votes
1 answer

Is it possible to check what feature detections my codebase are using from Modernizr?

I recently inherited a huge codebase where the entire Modernizr plugin is included. I'm trying to find out what feature detections that's actually used in the code base so that I can remove all unused feature detections or possibly remove everything…
moodh
  • 2,661
  • 28
  • 42
0
votes
1 answer

Check if Firefox/Firefox OS/Firefox for Android

I'm working on a snippet for check if the browser is Firefox/Firefox OS/Firefox for Android. The method for check is the user agent with a little feature detection. I haven't found a better way with a complete feature detection that cover all the…
Mte90
  • 115
  • 3
  • 13
0
votes
1 answer

Firefox and IE displaying iframed text at different size. What feature can I detect to increase the size of the iframe?

This question is especially for all the people who champion feature detection over browser detection. I was previously using browser detection to change the size of an iframe that was cutting off part of the embedded page in firefox and ie, but now…
0
votes
1 answer

jquery ui Drag and drop feature detection

I am using jQuery UI drag and drop on my website. I gather mobile devices generally do not support this functionality, so what is the simplest way to detect whether this feature will work or not, to provide an alternative in case it does not. Note:…
DaveWalley
  • 817
  • 10
  • 22
0
votes
1 answer

Browser detection in Javascript for a WebGL app

OK, I want to do browser detection; I know that everyone say not to. But here's why. I have a WebGL app/page. Detecting WebGL is easy. But if WebGL is not supported, I want to give the user information on what to do next. To do that, I need the…
0
votes
0 answers

detect if browser will fire javascript while scrolling

Some mobile browsers freeze javascript while scrolling, and therefore I won't receive scroll events until the user stops scrolling. Is there a way to detect this 'feature' so as to allow for it in a smart way? Or is the only solution to check the…
Mark Wheeler
  • 587
  • 2
  • 6
  • 19
0
votes
1 answer

How to check if a custom (pseudo) selector has been added to jQuery

I grabbed the following snippet from the comments on this post at CSSTricks.com. $.extend($.expr[":"], { "containsNC": function(elem, i, match, array) { return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3]…
Zach Lysobey
  • 14,959
  • 20
  • 95
  • 149
0
votes
0 answers

Check for *full* file system access with javascript

I'm looking to do some feature detection with JS to determine whether or not to show a typical 'input type="file"' element on a web page that will be accessed through desktops, tablets and phones. Ideally I want to only show the input on…
Jack
  • 307
  • 4
  • 15
0
votes
0 answers

Feature detection for CSS3 3d support (Opera Issues)

I'm trying to apply different styles for browsers that don't support CSS3 3d transforms. But for some reason, when I preview the page in opera it applies the styles for a 3D browser, even though it doesn't (to my knowledge) support CSS3 3d…
mmm
  • 2,272
  • 3
  • 25
  • 41
0
votes
3 answers

Font-face check from Modernizr

Modernizr detects CSS3 font-face support. http://modernizr.com/download/ How do I get only the source of the font-face test outside the modernizr? There's a file in repo related to this test, but I'm not sure how to use…
Jasper
  • 5,090
  • 11
  • 34
  • 41
0
votes
0 answers

What feature detection code can I replace this with?

I wonder if anyone can help with something. I work on a website which contains a form. When the form is submitted, we display an overlay which contains an animated gif - a 'please wait' type thing. When we first developed the code we had terrible…
0
votes
0 answers

Check if keyboard focus can be set by JavaScript?

On iOS 6.0 Safari, it is not possible to assign (hardware, on-screen) keyboard focus to an input element with JavaScript, except perhaps when the current script is running in response to a user action. How do I detect whether it is possible to set…
feklee
  • 7,555
  • 9
  • 54
  • 72
1 2 3
10
11