Thanks to Perfection kills, we can use the following JavaScript to detect event support:  function hasEvent(ev) {     var elem = document.createElement('a'),         type = 'on' + ev,         supported = elem[type] !== undefined;...
Different web browsers handle the window.close() function differently. IE prompts the user for confirmation, while Firefox and Safari just fail to honor it unless the window was originally opened with Javascript and display a message saying as much i...
Can we detect whether a browser supports dropping a file over an <input type="file" />?    For example, this is possible in Chrome but not in IE8.  Modernizr.draganddrop is a possibility but is it the right choice?  I'm not adding a...
I'm really enjoying ES6 generators. Is there a way I can detect generator support in browsers? I know generators might not be in a lot of browsers (or possible no browsers at all) at the moment, but that's OK for my purposes.   I tried:  try...
I'm currently doing some redesign of a website, basically just upgrading it to a more up-to-date look and trying to make it as resolution independent as possible, and in the name of resolution independence I figured I'd try to use SVG images...
I need to test for placeholder support. The following works great in all modern browsers, as well as IE7, IE8, IE9:  $.support.placeholder = (function () {     var i = document.createElement("input");     return "placeholder" in i; }(...
Internet Explorer does not support the data uri scheme for iframe urls (see http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx). Other browsers do. As browser detection is loaded with testing and future-proofing problems, I want to us...
When researching JavaScript conditional comments for IE, I stumbled upon @cc_on.  This seems to work.  However, the wikipedia entry on conditional comments provides the following code for more robust IE detections, specifically IE6:   /*@cc_on     @i...
I'm a keen advocate of feature detection opposed to device detection.  I'd like to be able to detect whether a browser (mobile or otherwise) supports Silverlight.  I've had a good google and found this Silverlight supported user agent but...
I actually have an issue im trying to solve since 3 weeks. Im trying to test support for vw units and serve a seperate stylesheet when the browser doesnt support the unit I read the modernizr tutorials and am familiar with modernizr css detects but t...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.