From 2c2c93c7cbfafdb06a27dafee88fc67b265c8e32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philip=20J=C3=A4genstedt?= Date: Sat, 22 Feb 2014 01:43:51 +0700 Subject: [PATCH] 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 --- AUTHORS.txt | 1 + src/selector-native.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index f68f3304a..45e7ee0e9 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -220,4 +220,5 @@ Roman Reiß Benjy Cui Rodrigo Rosenfeld Rosas John Hoven +Philip Jägenstedt 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, -- 2.39.5