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

View File

@ -1,6 +1,6 @@
{
"name": "clipboard",
"version": "1.6.1",
"version": "1.7.0",
"description": "Modern copy to clipboard. No Flash. Just 2kb",
"license": "MIT",
"main": "dist/clipboard.js",

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

View File

@ -3,7 +3,7 @@
Package.describe({
name: "zenorocha:clipboard",
summary: "Modern copy to clipboard. No Flash. Just 2kb.",
version: "1.6.1",
version: "1.7.0",
git: "https://github.com/zenorocha/clipboard.js"
});

View File

@ -1,6 +1,6 @@
{
"name": "clipboard",
"version": "1.6.1",
"version": "1.7.0",
"description": "Modern copy to clipboard. No Flash. Just 2kb",
"repository": "zenorocha/clipboard.js",
"license": "MIT",