mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
making keyboard.js depend less on jQuery...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1e095bf53a
commit
9428a8745c
@ -1088,9 +1088,16 @@ var KeyboardWithCSSModesPrototype = {
|
|||||||
context = context || this.context
|
context = context || this.context
|
||||||
return !pattern
|
return !pattern
|
||||||
|| pattern == '*'
|
|| pattern == '*'
|
||||||
// XXX can we join these into one search???
|
// jQuery...
|
||||||
|| context.is(pattern)
|
|| context.is ?
|
||||||
|| context.find(pattern).length > 0
|
(context.is(pattern)
|
||||||
|
|| context.find(pattern).length > 0)
|
||||||
|
: false
|
||||||
|
// Vanilla JS...
|
||||||
|
|| context.matches ?
|
||||||
|
(context.matches(pattern)
|
||||||
|
|| !!context.querySelector(pattern))
|
||||||
|
: false
|
||||||
},
|
},
|
||||||
|
|
||||||
__init__: function(keyboard, context){
|
__init__: function(keyboard, context){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user