aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Jägenstedt <philip@foolip.org>2014-02-22 01:43:51 +0700
committerDave Methvin <dave.methvin@gmail.com>2014-03-20 23:32:40 -0400
commit2c2c93c7cbfafdb06a27dafee88fc67b265c8e32 (patch)
treefaedbad06c4fbb842f9bcca79de9077846de9bfd
parentad032d3c7df04827989a4187117614c29bf3a4ad (diff)
downloadjquery-2c2c93c7cbfafdb06a27dafee88fc67b265c8e32.tar.gz
jquery-2c2c93c7cbfafdb06a27dafee88fc67b265c8e32.zip
Selector: Use Element.matches in selector-native if available
Spec: http://dom.spec.whatwg.org/#dom-element-matches Support in Chromium: https://code.google.com/p/chromium/issues/detail?id=326652 Fixes #14902 Closes gh-1524
-rw-r--r--AUTHORS.txt1
-rw-r--r--src/selector-native.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt
index f68f3304a..45e7ee0e9 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -220,4 +220,5 @@ Roman Reiß <me@silverwind.io>
Benjy Cui <benjytrys@gmail.com>
Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
John Hoven <hovenj@gmail.com>
+Philip Jägenstedt <philip@foolip.org>
diff --git a/src/selector-native.js b/src/selector-native.js
index cec99cef2..d8163c2f9 100644
--- a/src/selector-native.js
+++ b/src/selector-native.js
@@ -29,7 +29,8 @@ define([
var docElem = window.document.documentElement,
selector_hasDuplicate,
- matches = docElem.webkitMatchesSelector ||
+ matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
docElem.mozMatchesSelector ||
docElem.oMatchesSelector ||
docElem.msMatchesSelector,