doofinder
Advanced tools
Comparing version 4.1.8 to 4.1.9
{ | ||
"name": "doofinder", | ||
"description": "Javascript Library for Doofinder Search API", | ||
"version": "4.1.8", | ||
"version": "4.1.9", | ||
"main": "dist/doofinder.js", | ||
@@ -6,0 +6,0 @@ "authors": [ |
@@ -11,3 +11,3 @@ (function() { | ||
module.exports = { | ||
version: "4.1.8", | ||
version: "4.1.9", | ||
Client: require("./client"), | ||
@@ -14,0 +14,0 @@ Mustache: require("mustache"), |
@@ -71,3 +71,11 @@ | ||
DfDomElement.prototype.parents = function(selector) { | ||
var o, p, parents; | ||
var matchesFn, o, p, parents; | ||
matchesFn = null; | ||
['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'].some(function(fn) { | ||
if (typeof document.body[fn] === 'function') { | ||
matchesFn = fn; | ||
return true; | ||
} | ||
return false; | ||
}); | ||
parents = []; | ||
@@ -78,3 +86,3 @@ if (this._first() && this._first().parentElement) { | ||
o = p; | ||
if ((selector == null) || o.matches(selector)) { | ||
if ((selector == null) || o[matchesFn](selector)) { | ||
parents.push(o); | ||
@@ -81,0 +89,0 @@ } |
{ | ||
"name": "doofinder", | ||
"version": "4.1.8", | ||
"version": "4.1.9", | ||
"description": "Javascript Library for Doofinder Search API", | ||
@@ -5,0 +5,0 @@ "main": "lib/doofinder.js", |
Sorry, the diff of this file is not supported yet
123823
2792