Skip to content

Instantly share code, notes, and snippets.

@sdesai
Created July 15, 2013 19:34
Show Gist options
  • Save sdesai/6002726 to your computer and use it in GitHub Desktop.
Save sdesai/6002726 to your computer and use it in GitHub Desktop.
FF 22, scoped style, getComputedStyle bug
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type='text/javascript' src='http://yui.yahooapis.com/3.10.3/build/yui/yui.js'></script>
<title>Node</title>
</head>
<body>
<div>
<style scoped>
#testme.hidden {
display:none;
}
</style>
<div id="testme" class="hidden">Stuff</div>
<script>
YUI({filter:"raw", combine:false}).use("node", function(Y) {
alert(Y.one("#testme").getComputedStyle("display"));
});
</script>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment