Last active
August 29, 2015 14:01
-
-
Save d-adamkiewicz/9d9d149b959b5d5f2820 to your computer and use it in GitHub Desktop.
YUI3.16.0/getStyle('background-image') bug - IE8/Firefox 29.0.1
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>YUI3.16.0/getStyle('background-image') bug - IE8/Firefox 29.0.1</title> | |
<meta charset="utf-8" /> | |
<style type="text/css"> | |
.pick div { | |
background-image: url(rect.png); | |
width: 41px; | |
height: 41px; | |
} | |
</style> | |
<script src="http://yui.yahooapis.com/3.16.0/build/yui/yui-min.js"></script> | |
</head> | |
<body> | |
<span class="pick"><div id="some"> </div></span> | |
<script> | |
YUI().use('node', function(Y) { | |
// works in Chrome, doesn't in IE8/FF29 | |
console.log(Y.one('#some').getStyle('background-image')); | |
// works in Chrome/IE8/FF29 | |
console.log(Y.one('#some').getStyle('backgroundImage')); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment