Skip to content

Commit

Permalink
prototype: Fix readAttribute-related failure in form.html in IE.
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Aug 14, 2007
1 parent c27f2de commit d8b8c65
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Fix readAttribute-related failure in form.html in IE. [sam, Andrew Dupont]

* Fix failing dom.html and selector.html tests in IE. [Tobie Langel, Andrew Dupont]

* Make sure the WebKit redefinition of Element#cumulativeOffset uses Element._returnOffset. Closes #9245. [mdaines]
Expand Down
19 changes: 12 additions & 7 deletions src/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,10 @@ else if (Prototype.Browser.IE) {
_getAttr: function(element, attribute) {
return element.getAttribute(attribute, 2);
},
_getAttrNode: function(element, attribute) {
var node = element.getAttributeNode(attribute);
return node ? node.value : "";
},
_getEv: function(element, attribute) {
var attribute = element.getAttribute(attribute);
return attribute ? attribute.toString().slice(23, -2) : null;
Expand Down Expand Up @@ -839,13 +843,14 @@ else if (Prototype.Browser.IE) {

(function(v) {
Object.extend(v, {
href: v._getAttr,
src: v._getAttr,
type: v._getAttr,
disabled: v._flag,
checked: v._flag,
readonly: v._flag,
multiple: v._flag,
href: v._getAttr,
src: v._getAttr,
type: v._getAttr,
action: v._getAttrNode,
disabled: v._flag,
checked: v._flag,
readonly: v._flag,
multiple: v._flag,
onload: v._getEv,
onunload: v._getEv,
onclick: v._getEv,
Expand Down

0 comments on commit d8b8c65

Please sign in to comment.