aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
authorMisko Hevery2012-03-13 14:42:26 -0700
committerMisko Hevery2012-03-13 16:59:03 -0700
commitde9464c1431906883bdf180fb00615e6fa371577 (patch)
tree5002990279d089cae2577ab98468217258455dec /src/jqLite.js
parent31cd5803102ba93f8b93cd5304aea4ade50f96ab (diff)
downloadangular.js-de9464c1431906883bdf180fb00615e6fa371577.tar.bz2
f(compile): boolean attributes too agresive
- compiler would rewrite boolean attributes on all elements. This is too aggressive and interferes with some third-party frameworks
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index dd793ab2..96dda112 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -310,6 +310,14 @@ var BOOLEAN_ATTR = {};
forEach('multiple,selected,checked,disabled,readOnly,required'.split(','), function(value) {
BOOLEAN_ATTR[lowercase(value)] = value;
});
+var BOOLEAN_ELEMENTS = {};
+forEach('input,select,option,textarea,button'.split(','), function(value) {
+ BOOLEAN_ELEMENTS[uppercase(value)] = true;
+});
+
+function isBooleanAttr(element, name) {
+ return BOOLEAN_ELEMENTS[element.nodeName] && BOOLEAN_ATTR[name.toLowerCase()];
+}
forEach({
data: JQLiteData,