mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
* add selectedText * better code * remove dist folder * Revert "remove dist folder" This reverts commit 50e726c7a790a1c4a76469e15b56baccc44a4599. * orogin dist source
This commit is contained in:
parent
60b6887100
commit
76b907949c
@ -119,21 +119,12 @@ class ClipboardAction {
|
|||||||
* @param {Boolean} succeeded
|
* @param {Boolean} succeeded
|
||||||
*/
|
*/
|
||||||
handleResult(succeeded) {
|
handleResult(succeeded) {
|
||||||
if (succeeded) {
|
this.emitter.emit(succeeded ? 'success' : 'error', {
|
||||||
this.emitter.emit('success', {
|
action: this.action,
|
||||||
action: this.action,
|
text: this.selectedText,
|
||||||
text: this.selectedText,
|
trigger: this.trigger,
|
||||||
trigger: this.trigger,
|
clearSelection: this.clearSelection.bind(this)
|
||||||
clearSelection: this.clearSelection.bind(this)
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.emitter.emit('error', {
|
|
||||||
action: this.action,
|
|
||||||
trigger: this.trigger,
|
|
||||||
clearSelection: this.clearSelection.bind(this)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user