Created
October 25, 2011 05:17
-
-
Save dobesv/1311372 to your computer and use it in GitHub Desktop.
Example of an issue in the purejs templating engine where a css class that is modified by the directives cannot be used in selector matching
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
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<div id='container'> | |
<div class='foo'> | |
<div class='bar'> | |
bla | |
</div> | |
</div> | |
</div> | |
<script type='text/javascript' src='http://beebole.com/pure/wp-includes/js/l10n.js?ver=20101110'></script> | |
<script type='text/javascript' src='http://beebole.com/pure/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script> | |
<script type='text/javascript' src='http://beebole.com/pure/wp-content/themes/BeeBole-pure/libs/json2.js'></script> | |
<script type='text/javascript' src='http://beebole.com/pure/wp-content/themes/BeeBole-pure/libs/pure.js'></script> | |
<script> | |
console.log('Before compile ... '); | |
$p('#container').compile({ | |
//'.foo@class+':'cssToAppend', | |
'.foo .bar':'barText' | |
}); | |
console.log('Compiled first version ...'); | |
$p('#container').compile({ | |
'.foo@class+':'cssToAppend', | |
'.foo .bar':'barText' | |
}); | |
console.log('Compiled second version ...'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment