Created
April 9, 2022 02:50
-
-
Save akirayou/58a33b0eb6faba9fe50656467535b11d 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
<html> | |
<body> | |
<img id="a"/> | |
<script> | |
var img=document.getElementById("a"); | |
img.addEventListener('load',function(){ | |
img.src="http://atomcam.local/cgi-bin/get_jpeg.cgi?"+ Date.now(); | |
//console.log("laod"); | |
}); | |
const sleep = msec => new Promise(resolve => setTimeout(resolve, msec)); | |
window.addEventListener('load',async function(){ | |
await(sleep(10)); | |
img.src="http://atomcam.local/cgi-bin/get_jpeg.cgi?"+ Date.now(); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment