Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const btn = document.querySelector("button");
- btn.disabled = false;
- btn.onclick = function(e) {
- takeASnap()
- .then(toDataURL)
- .then(async function() {
- Object.keys(await returnData).forEach(function(item) {
- console.log(item); // key
- console.log(typeof item);
- console.log(item);
- console.log(returnData[item]); // value
- });
- console.log(await returnData);
- });
- };
- });
- <div class="window">
- <video></video>
- <button class="snapshot">take a snapshot</button>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement