mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Release v1.7.0
This commit is contained in:
9
dist/clipboard.js
vendored
9
dist/clipboard.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* clipboard.js v1.6.1
|
||||
* clipboard.js v1.7.0
|
||||
* https://zenorocha.github.io/clipboard.js
|
||||
*
|
||||
* Licensed MIT © Zeno Rocha
|
||||
@@ -10,7 +10,7 @@ var DOCUMENT_NODE_TYPE = 9;
|
||||
/**
|
||||
* A polyfill for Element.matches()
|
||||
*/
|
||||
if (Element && !Element.prototype.matches) {
|
||||
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
|
||||
var proto = Element.prototype;
|
||||
|
||||
proto.matches = proto.matchesSelector ||
|
||||
@@ -29,7 +29,10 @@ if (Element && !Element.prototype.matches) {
|
||||
*/
|
||||
function closest (element, selector) {
|
||||
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
|
||||
if (element.matches(selector)) return element;
|
||||
if (typeof element.matches === 'function' &&
|
||||
element.matches(selector)) {
|
||||
return element;
|
||||
}
|
||||
element = element.parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
4
dist/clipboard.min.js
vendored
4
dist/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user