-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
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
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
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