mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
🐎 webkitMatchesSelector -> querySelector
This commit is contained in:
@@ -10,7 +10,9 @@ exports.isSelectorValid = (selector) ->
|
||||
|
||||
testElement ?= document.createElement('div')
|
||||
try
|
||||
testElement.webkitMatchesSelector(selector)
|
||||
# querySelector appears to be faster than webkitMatchesSelector
|
||||
# http://jsperf.com/query-vs-matches
|
||||
testElement.querySelector(selector)
|
||||
selectorCache[selector] = true
|
||||
true
|
||||
catch selectorError
|
||||
|
||||
Reference in New Issue
Block a user