mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Renames "initialize" method to "onClick" #51
This commit is contained in:
@@ -34,14 +34,14 @@ class Clipboard extends Emitter {
|
||||
* @param {String} selector
|
||||
*/
|
||||
delegateClick(selector) {
|
||||
Delegate.bind(document.body, selector, 'click', (e) => this.initialize(e));
|
||||
Delegate.bind(document.body, selector, 'click', (e) => this.onClick(e));
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a new `ClipboardAction` on each click event.
|
||||
* @param {Event} e
|
||||
*/
|
||||
initialize(e) {
|
||||
onClick(e) {
|
||||
if (this.clipboardAction) {
|
||||
this.clipboardAction = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user