Closed Bug 28277 Opened 25 years ago Closed 24 years ago

image.complete (for an image object created in JavaScript) does not return boolean value

Categories

(Core :: DOM: Core & HTML, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mozilla, Assigned: jst)

References

Details

(Keywords: testcase, Whiteboard: [nsbeta3+])

Attachments

(1 file)

This seems to be similar to bug #23074.  In this case, the image object is
created in JavaScript.

SAMPLE CODE:
<HTML>
<HEAD>
<script>
<!--
var testimage = new Image();
testimage.src = "http://path/to/an/image.gif";

function getcomplete(){
	document.inForm.result.value = testimage.complete;
}
//-->
</script>
</HEAD>

<BODY>

<form name="inForm">
<input type="button" value="Did Image load Completely ?"
onclick="getcomplete();">Result:
<input type="text" name="result" size="20" value="">
</form>

</BODY>
</HTML>
I can reproduse this so I'm confirming it.

Also adding testcase keyword
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Nom. nsbeta3, recc. nsbeta3+ stopper. 4xp JavaScript API compatibility. Need to 
keep this working compatibly in Moz; there's no DOM standard-equivalent for this 
functionality, and giving JavaScript full power to create and manipulate content 
is a strategic priority for Moz-based browsers.
Keywords: 4xp, nsbeta3
This is really a dup of 38610 (nsbeta2+), once that's done this will work.
Marking as a dup.

*** This bug has been marked as a duplicate of 38610 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Verified Duplicate.
Status: RESOLVED → VERIFIED
Unduping this since the fix for bug 38610 won't fix this (I was planning on fixing
this while fixing bug 38610 bug fixing this requires changes that I don't feel
comfortable with this close to beta2). This *must* be fixed for beta3 tho.
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---
Taking this off Vidurs list...
Assignee: vidur → jst
Status: REOPENED → NEW
OS: Windows NT → All
Priority: P3 → P1
Hardware: PC → All
Target Milestone: --- → M18
Status: NEW → ASSIGNED
correctness and backward compatibility. PDT team please see my earlier comments
and approve.
Keywords: correctness
Marking nsbeta3+
Whiteboard: [nsbeta3+]
*** Bug 48895 has been marked as a duplicate of this bug. ***
Blocks: 46046
Blocks: 22710
Who uses this?  Is this high profile? Moving to P2.  Adding [PDTP2]
Priority: P1 → P2
Whiteboard: [nsbeta3+] → [nsbeta3+][PDTP2]
This is sometimes used for simple stuff like roll-over images. So the 
visibility of this bug is quite high. Also the width/height properties 
mentioned by Martin are frequently used.
Per michael@bitspin.com in an email to me :-)
"Anyone who does javascript rollovers and is aware of low bandwidth users (or
random network drag).

If you use javascript to preload an image you will at some point assign a
visible image to this URL.  If you do this without knowing whether the image
is loaded, you may put a broken or half drawn image up.  Without the
complete property, javascript rollovers and animation break down completely.

Also, what if you want to preload the images sequentially...

Most people don't use this property.  And under the right conditions it can
really show."

Setting back to P1.  PDT agrees P1. :-)

Johnny can you get to this one soon?
Priority: P2 → P1
Whiteboard: [nsbeta3+][PDTP2] → [nsbeta3+]
Yes, I'm working on this right now, this is fixed in my tree, will do more
testing before checking in tho...

Pointers to some very complicated pages that rely heavily on image.complete are
very welcome...
I checked in a fix for this, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
vrfy
Status: RESOLVED → VERIFIED
Thanks for the job, Johnny.  Here's a page relying heavily on image.complete 
(and width/height).  It opens as many windows as you want and works nicely with 
2000091505.  Well, almost : still uncaught exceptions probably related to window 
openings. 
http://www.bestmat.be/en/promos.html 
Oops, very sorry ! Here's the right URL : 
http://www.bestmat.be/en/occas.html
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: