Skip to content

Commit

Permalink
Revert "fix for #841 and some other related issues with xml nodes and…
Browse files Browse the repository at this point in the history
… their attributes."

This reverts commit 7f3dc4c.
  • Loading branch information
fabiomcosta committed Jul 5, 2010
1 parent db3ff48 commit d5b2331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Element/Element.js
Expand Up @@ -370,7 +370,7 @@ Element.implement({
attribute = camels[attribute] || attribute;
if (value == null) return this.removeProperty(attribute);
var key = attributes[attribute];
(key && key in this) ? this[key] = value :
(key) ? this[key] = value :
(bools[attribute]) ? this[attribute] = !!value : this.setAttribute(attribute, '' + value);
return this;
},
Expand All @@ -383,7 +383,7 @@ Element.implement({
getProperty: function(attribute){
attribute = camels[attribute] || attribute;
var key = attributes[attribute] || readOnly[attribute];
return (key && key in this) ? this[key] :
return (key) ? this[key] :
(bools[attribute]) ? !!this[attribute] :
(uriAttrs.test(attribute) ? this.getAttribute(attribute, 2) :
(key = this.getAttributeNode(attribute)) ? key.nodeValue : null) || null;
Expand All @@ -397,7 +397,7 @@ Element.implement({
removeProperty: function(attribute){
attribute = camels[attribute] || attribute;
var key = attributes[attribute];
(key && key in this) ? this[key] = '' :
(key) ? this[key] = '' :
(bools[attribute]) ? this[attribute] = false : this.removeAttribute(attribute);
return this;
},
Expand Down

0 comments on commit d5b2331

Please sign in to comment.