mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
add selectedText
This commit is contained in:
5
dist/clipboard.js
vendored
5
dist/clipboard.js
vendored
@@ -407,7 +407,6 @@ module.exports = E;
|
||||
/**
|
||||
* @param {Object} options
|
||||
*/
|
||||
|
||||
function ClipboardAction(options) {
|
||||
_classCallCheck(this, ClipboardAction);
|
||||
|
||||
@@ -493,7 +492,7 @@ module.exports = E;
|
||||
};
|
||||
|
||||
ClipboardAction.prototype.copyText = function copyText() {
|
||||
var succeeded = undefined;
|
||||
var succeeded = void 0;
|
||||
|
||||
try {
|
||||
succeeded = document.execCommand(this.action);
|
||||
@@ -515,6 +514,7 @@ module.exports = E;
|
||||
} else {
|
||||
this.emitter.emit('error', {
|
||||
action: this.action,
|
||||
text: this.selectedText,
|
||||
trigger: this.trigger,
|
||||
clearSelection: this.clearSelection.bind(this)
|
||||
});
|
||||
@@ -642,7 +642,6 @@ module.exports = E;
|
||||
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
||||
* @param {Object} options
|
||||
*/
|
||||
|
||||
function Clipboard(trigger, options) {
|
||||
_classCallCheck(this, Clipboard);
|
||||
|
||||
|
||||
8
dist/clipboard.min.js
vendored
8
dist/clipboard.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -130,6 +130,7 @@ class ClipboardAction {
|
||||
else {
|
||||
this.emitter.emit('error', {
|
||||
action: this.action,
|
||||
text: this.selectedText,
|
||||
trigger: this.trigger,
|
||||
clearSelection: this.clearSelection.bind(this)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user