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

View File

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