How exactly does an image element's `complete` property work?

后端 未结 2 1078
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-08 20:20

I have ran into a bit of a problem with my understanding of the complete property.

I assumed complete would be true if the image has been downl

2条回答
  •  爱一瞬间的悲伤
    2021-02-08 20:39

    I've got the answer, but you're not going to like it...

    When the image in question is created with document.createElement, it works. See http://jsfiddle.net/minitech/nmuQ8/

    I discovered that this works while creating a test to see if it doesn't work, so so far I don't have a way to tell if the replacement is actually necessary, unfortunately.

提交回复
热议问题