Created
May 10, 2020 11:18
-
-
Save eivindml/70a5d78d3295eb00d4ef0049e7f75737 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let ui = { | |
setDisplayName: (name) => { | |
document.getElementById('displayName').innerHTML = name | |
}, | |
setProfilePicture: (imgBlob) => { | |
document | |
.getElementById('profileImg') | |
.setAttribute('src', URL.createObjectURL(imgBlob)) | |
}, | |
updateOutput: (res) => { | |
let output = '<pre>' | |
for (var key in res) { | |
if (res.hasOwnProperty(key)) { | |
output += `<span style='color: green;'>"${key}"</span>: "${res[key]}", <br />` | |
} | |
} | |
output += '</pre>' | |
document.getElementById('output').innerHTML = output | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment