[javascript] new Image(), how to know if image 100% loaded or not?