aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIgor Minar2011-09-16 00:56:19 +0200
committerIgor Minar2011-09-16 02:44:30 +0200
commit3800d177030d20c5c3d04e3601f892c46e723dc2 (patch)
tree6919648ab112aec5a22cf54b3ce8b31b7902f9d5 /src
parent009059dd1bc7817dbb55fc1b61424fd66a914bc3 (diff)
downloadangular.js-3800d177030d20c5c3d04e3601f892c46e723dc2.tar.bz2
feat(jqLite): add prop() support
since jQuery 1.6.4 prop() became very important because attr() does't have access to certain properties any more (e.g. className), so I'm adding it to jqLite as well so that jqLite preserves the feature-set it had before the jQuery upgrade.
Diffstat (limited to 'src')
-rw-r--r--src/jqLite.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 6d42bbc2..d7faa1e8 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -40,6 +40,7 @@
* - [eq()](http://api.jquery.com/eq/)
* - [hasClass()](http://api.jquery.com/hasClass/)
* - [parent()](http://api.jquery.com/parent/)
+ * - [prop()](http://api.jquery.com/prop/)
* - [remove()](http://api.jquery.com/remove/)
* - [removeAttr()](http://api.jquery.com/removeAttr/)
* - [removeClass()](http://api.jquery.com/removeClass/)
@@ -287,6 +288,14 @@ forEach({
}
},
+ prop: function(element, name, value) {
+ if (isDefined(value)) {
+ element[name] = value;
+ } else {
+ return element[name];
+ }
+ },
+
text: extend((msie < 9)
? function(element, value) {
// NodeType == 3 is text node