a";
a = div.getElementsByTagName( "a" )[ 0 ];
+ // Finish early in limited (non-browser) environments
+ if ( !a || !a.style ) {
+ return;
+ }
+
a.style.cssText = "float:left;opacity:.5";
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- support.opacity = /^0.5/.test( a.style.opacity );
+ // Support: IE<9
+ // Make sure that element opacity exists (as opposed to filter)
+ support.opacity = a.style.opacity === "0.5";
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)
diff --git a/src/effects/support.js b/src/effects/support.js
index 85b77c9cc..1faf1110f 100644
--- a/src/effects/support.js
+++ b/src/effects/support.js
@@ -15,12 +15,16 @@ define([
div.innerHTML = "
a";
a = div.getElementsByTagName( "a" )[ 0 ];
+ // Finish early in limited (non-browser) environments
+ if ( !a || !a.style ) {
+ return;
+ }
+
a.style.cssText = "float:left;opacity:.5";
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- support.opacity = /^0.5/.test( a.style.opacity );
+ // Support: IE<9
+ // Make sure that element opacity exists (as opposed to filter)
+ support.opacity = a.style.opacity === "0.5";
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)