prototype: Fix a bug in the simulated hasAttribute for IE due to getAttributeNode sometimes returning null.
This commit is contained in:
parent
60bb0686ba
commit
94d8333448
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Fix a bug in the simulated hasAttribute for IE due to getAttributeNode sometimes returning null. [sam]
|
||||
|
||||
* Optimize Element.getStyle and add new Element.getOpacity method. Special case IE and Opera getStyle methods. Closes #7648. [Tobie Langel, Thomas Fuchs]
|
||||
|
||||
* Optimize Element.setStyle and add new Element.setOpacity method, special case IE and Gecko opacity methods. Closes #7585. [savetheclocktower]
|
||||
|
|
|
@ -512,9 +512,10 @@ Object.extend(Element._attributeTranslations.values, {
|
|||
|
||||
Element.Methods.Simulated = {
|
||||
hasAttribute: function(element, attribute) {
|
||||
var t = Element._attributeTranslations;
|
||||
var t = Element._attributeTranslations, node;
|
||||
attribute = t.names[attribute] || attribute;
|
||||
return $(element).getAttributeNode(attribute).specified;
|
||||
node = $(element).getAttributeNode(attribute);
|
||||
return node && node.specified;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue