Small ES2015 changes ;).

This commit is contained in:
Oskar Cieslik (rpawfuiml) 2015-11-13 22:01:59 +01:00
parent 783dc6f3cf
commit 2aa163b1d0
2 changed files with 3 additions and 7 deletions

View File

@ -4,7 +4,7 @@ import select from 'select';
* Inner class which performs selection from either `text` or `target`
* properties and then executes copy or cut operations.
*/
class ClipboardAction {
export default class ClipboardAction {
/**
* @param {Object} options
*/
@ -192,5 +192,3 @@ class ClipboardAction {
this.removeFake();
}
}
export default ClipboardAction;

View File

@ -6,7 +6,7 @@ import listen from 'good-listener';
* Base class which takes one or more elements, adds event listeners to them,
* and instantiates a new `ClipboardAction` on each click.
*/
class Clipboard extends Emitter {
export default class Clipboard extends Emitter {
/**
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
* @param {Object} options
@ -42,7 +42,7 @@ class Clipboard extends Emitter {
* @param {Event} e
*/
onClick(e) {
var trigger = e.delegateTarget || e.currentTarget;
let trigger = e.delegateTarget || e.currentTarget;
if (this.clipboardAction) {
this.clipboardAction = null;
@ -113,5 +113,3 @@ function getAttributeValue(suffix, element) {
return element.getAttribute(attribute);
}
export default Clipboard;