Created
February 18, 2014 16:09
-
-
Save kevbradwick/9073945 to your computer and use it in GitHub Desktop.
novel way of ie6 detection that doesn't rely on user agent sniffing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Property: mapTypes | |
* The types of map we're switching between | |
*/ | |
mapTypes: (function() { | |
var div = document.createElement('div'); | |
div.innerHTML = '<!--[if lte IE 6]><i></i><![endif]-->'; | |
if (!!div.getElementsByTagName('i').length) { | |
return ['normal', 'satellite', 'terrain']; | |
} | |
return ['normal', 'satellite', 'hybrid']; | |
}()), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment