diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:43:30 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:43:30 +0000 |
| commit | cd79d48d9799b715188a63461f2023eb4187ad39 (patch) | |
| tree | 0268d6606db2e803ad42d8bef63ee6f546e9fa28 /lib/html-paths.js | |
| parent | b1b0fcd0547f1b432baab03038903414a1475a1b (diff) | |
Consider attributes when matching elements
Diffstat (limited to 'lib/html-paths.js')
| -rw-r--r-- | lib/html-paths.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/html-paths.js b/lib/html-paths.js index 9ecb6dd..d2456c2 100644 --- a/lib/html-paths.js +++ b/lib/html-paths.js @@ -41,7 +41,7 @@ function Element(tagName, attributes, options) { } Element.prototype.matchesElement = function(element) { - return this.tagNames[element.tagName]; + return this.tagNames[element.tagName] && _.isEqual(this.attributes || {}, element.attributes || {}); } |
