From d5b2331fa9bd1ab3e4d48d0b6a18e16a02665663 Mon Sep 17 00:00:00 2001 From: "Fabio M. Costa" Date: Mon, 5 Jul 2010 20:47:23 -0300 Subject: [PATCH] Revert "fix for #841 and some other related issues with xml nodes and their attributes." This reverts commit 7f3dc4c1004bb6c8894ec4cee6a4c0e46ef2c66d. --- Source/Element/Element.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Element/Element.js b/Source/Element/Element.js index 79cf89ba9..69afb99f4 100644 --- a/Source/Element/Element.js +++ b/Source/Element/Element.js @@ -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; }, @@ -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; @@ -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; },