PeakyTests / Peaky

Tests as a Service
Other
5 stars 8 forks source link

Actually copy to Clipboard #20

Closed nathanboktae closed 8 years ago

nathanboktae commented 8 years ago

It's great in 2016 we can actually copy to the clipboard again. I even used semicolons and 4-space indents just for you.

note: didn't actually test, just taken straight from a module we have in our app so it's straightforward.

PhillipPruett commented 8 years ago

Oh nice, I'll test it!

nathanboktae commented 8 years ago

yup you'll want to wire up some copied class and animate in a checkbox or some background effect to give the user the effect that something happened.

with vanilla.js:

element.classList.add('copied')
element.addEventListener('animationend', () => el.classList.remove('copied'))
PhillipPruett commented 8 years ago

worked great! thanks Nathan.