Closed Bug 296796 Opened 20 years ago Closed 19 years ago

JavaScript "complete" property always returns "true"

Categories

(Firefox :: General, defect)

x86
Windows ME
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: c.divizia, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)
Build Identifier: Firefox 1.0.4

The JavaScript "complete" property is a boolean value that indicates whether 
the web browser has completed its attempt to load an image. It is a property of
"Image". I am using it to check whether preloaded images are ready for use.

It should return "false" (as it does in IE) if you try to load a non-existing 
file, but it always returns "true" in FireFox. Please try the following code: 

<HTML>
<HEAD>
</HEAD>

<BODY>

<SCRIPT type="text/javascript">
image1=new Image()
image1.src='fakeurl.jpg'
alert(image1.complete)
</SCRIPT>

</BODY>

</HTML>

Reproducible: Always

Steps to Reproduce:
1. just try the html code I wrote in "details" above. Thanks!
Actual Results:  
returns "true"

Expected Results:  
should return "false"
Attached file test case
Returns "false" using Firefox 1.1a1.
Bug 190561 says this is deliberate to avoid a potential security issue.
i get false as well
I get "true" now. See comment 3 for explanation.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: