Renames host argument to emitter

This commit is contained in:
Zeno Rocha 2015-09-26 07:31:59 -07:00
parent aa6cc8e4df
commit e3f69de585
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ class ClipboardAction {
*/
constructor(options) {
this.action = options.action;
this.host = options.host;
this.emitter = options.emitter;
this.target = options.target;
this.text = options.text;
this.trigger = options.trigger;
@ -103,7 +103,7 @@ class ClipboardAction {
*/
handleResult(succeeded) {
if (succeeded) {
this.host.emit('success', {
this.emitter.emit('success', {
action: this.action,
text: this.selectedText,
trigger: this.trigger,
@ -111,7 +111,7 @@ class ClipboardAction {
});
}
else {
this.host.emit('error', {
this.emitter.emit('error', {
action: this.action,
trigger: this.trigger,
clearSelection: this.clearSelection.bind(this)

View File

@ -31,7 +31,7 @@ class Clipboard extends Emitter {
target : e.delegateTarget.getAttribute('data-target'),
text : e.delegateTarget.getAttribute('data-text'),
trigger : e.delegateTarget,
host : this
emitter : this
});
}
}