Permalink
Browse files

reverted removal of case transforming lines for insensitive match of …

…attribute names
  • Loading branch information...
1 parent d94e868 commit f39caba5267c38fea1682fa50a5fb116effb3ecc @dperini committed Jan 3, 2013
Showing with 3 additions and 0 deletions.
  1. +1 −0 src/nwmatcher-base.js
  2. +2 −0 src/nwmatcher.js
View
@@ -281,6 +281,7 @@
getAttribute =
function(node, attribute) {
+ attribute = attribute.toLowerCase();
if (typeof node[attribute] == 'object') {
return node.attributes[attribute] &&
node.attributes[attribute].value || '';
View
@@ -728,6 +728,7 @@
return node.getAttribute(attribute) || '';
} :
function(node, attribute) {
+ attribute = attribute.toLowerCase();
return (
// type needs using native getAttribute
attribute == 'type' ? node.getAttribute(attribute) || '' :
@@ -747,6 +748,7 @@
node.hasAttribute(attribute);
} :
function(node, attribute) {
+ attribute = attribute.toLowerCase();
if (ATTR_DEFAULT[attribute]) {
return !!node[ATTR_DEFAULT[attribute]];
}

0 comments on commit f39caba

Please sign in to comment.