mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
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:
committed by
Zeno Rocha
parent
e1394b3b8c
commit
5ab50475e0
@@ -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;
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user