-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failed tests without jQuery on IE9-11 (#668)
- Loading branch information
1 parent
f07b8d1
commit f6ad138
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use strict"; | ||
|
||
var matches = Element.prototype.matches || | ||
Element.prototype.matchesSelector || | ||
Element.prototype.mozMatchesSelector || | ||
Element.prototype.msMatchesSelector || | ||
Element.prototype.oMatchesSelector || | ||
Element.prototype.webkitMatchesSelector || | ||
function(selector) { | ||
var items = (this.document || this.ownerDocument).querySelectorAll(selector); | ||
|
||
for(var i = 0; i < items.length; i++) { | ||
if(items === this) { | ||
return true; | ||
} | ||
} | ||
}; | ||
|
||
module.exports = function(element, selector) { | ||
return matches.call(element, selector); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters