You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the HTML specification [1], HTMLImageElement#complete
indicates whether or not an image is loading. It does not indicate
whether or not the image successfully loaded.
When an Image fails to load, we call the onerror callback. However,
Image#complete is false, despite the current request's state being
'broken' (according to the spec). This is not spec-compliant.
Because our Image implementation loads images synchronously (as soon as
the src property is set, which is not spec-compliant), then the current
request's state is only ever 'completely available' or 'broken' [2] (if
src is set). This means that, according to the spec, Image#complete must
always be true. Fix Image#complete to return true unconditionally.
[1] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-complete
[2] https://html.spec.whatwg.org/multipage/images.html#img-req-state
0 commit comments