Permalink
Browse files

check for bugs affecting attributes, overwritten by misnamed elements…

… references
  • Loading branch information...
1 parent f39caba commit 4daecc3ad512e107d1f08ee7e1b703a5ab64d773 @dperini committed Jan 4, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/nwmatcher.js
View
@@ -729,6 +729,10 @@
} :
function(node, attribute) {
attribute = attribute.toLowerCase();
+ if (typeof node[attribute] == 'object') {
+ return node.attributes[attribute] &&
+ node.attributes[attribute].value || '';
+ }
return (
// type needs using native getAttribute
attribute == 'type' ? node.getAttribute(attribute) || '' :

0 comments on commit 4daecc3

Please sign in to comment.