Release v1.7.0

This commit is contained in:
Zeno Rocha
2017-05-29 14:43:28 -07:00
parent f8c322f163
commit 39e622456c
5 changed files with 11 additions and 8 deletions

9
dist/clipboard.js vendored
View File

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

File diff suppressed because one or more lines are too long