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
This commit is contained in:
Philip Jägenstedt 2014-02-22 01:43:51 +07:00 committed by Dave Methvin
parent ad032d3c7d
commit 2c2c93c7cb
2 changed files with 3 additions and 1 deletions

View File

@ -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>

View File

@ -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,