Closed
Bug 1221973
Opened 9 years ago
Closed 9 years ago
image.complete is inconsistent after setting base64 string
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: capajj, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 Build ID: 20151016093648 Steps to reproduce: Pasted into console: var img = new Image();img.src = 'data:image/gif;base64,R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQSAOw==';console.log(img.complete) Actual results: first time this runs for that base64 string it logs false, any time after that it returns true Expected results: I would expect it to return true every time for base64 images with src set
Updated•9 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Comment 1•9 years ago
|
||
The image will be complete when either the sync image cache is hit (which is what you see on the second and later times you do this) or when the async data: fetc completes (which is what you see the first time). Since the fetc is async, img.complete does not become true immediately.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•