Created
September 10, 2014 07:34
-
-
Save shenqihui/120ee799a3b2568725f0 to your computer and use it in GitHub Desktop.
image load test
This file contains 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
var img = document.createElement('img') | |
img.onload = function() { | |
console.log('load', img.width, img.height, this); | |
} | |
img.src = "https://assets-cdn.github.com/images/octocats/setuptocat.jpg"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment