ES6 refactor (#409)

* little fix

* little fix /2

* test/clipboard.js refactored

* emitter: emitter --> emitter

* Examples in ES6

* es6

* back to original code

* script > npm test

* script > npm test not necessary

* updating modules

* removing export default
This commit is contained in:
Gabriel Kalani
2017-05-03 01:34:18 -03:00
committed by Zeno Rocha
parent e1394b3b8c
commit 5ab50475e0
5 changed files with 27 additions and 27 deletions

View File

@@ -64,7 +64,7 @@ class ClipboardAction {
this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px';
// Move element to the same position vertically
let yPosition = window.pageYOffset || document.documentElement.scrollTop;
this.fakeElem.style.top = yPosition + 'px';
this.fakeElem.style.top = `${yPosition}px`;
this.fakeElem.setAttribute('readonly', '');
this.fakeElem.value = this.text;

View File

@@ -52,7 +52,7 @@ class Clipboard extends Emitter {
action : this.action(trigger),
target : this.target(trigger),
text : this.text(trigger),
trigger : trigger,
trigger,
emitter : this
});
}