Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. const btn = document.querySelector("button");
  2. btn.disabled = false;
  3. btn.onclick = function(e) {
  4.  
  5. takeASnap()
  6. .then(toDataURL)
  7. .then(async function() {
  8. Object.keys(await returnData).forEach(function(item) {
  9. console.log(item); // key
  10. console.log(typeof item);
  11. console.log(item);
  12.  
  13. console.log(returnData[item]); // value
  14. });
  15. console.log(await returnData);
  16. });
  17.  
  18. };
  19. });
  20.  
  21. <div class="window">
  22. <video></video>
  23. <button class="snapshot">take a snapshot</button>
  24. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement