unexpected js component interface error

VERIFIED FIXED in M16

Status

()

Core
DOM: Core & HTML
P3
normal
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: sean echevarria, Assigned: jst)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta2+][ETA 7/11])

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
Loading the attached html file generates a js error: Exception... "Component 
does not have requested interface" code: "-2147467262" nsresult: "0x80004002 
(NS_NOINTERFACE)"

It appears that mozilla considers 'complete' an interface of an image object?
(Reporter)

Updated

18 years ago
Keywords: 4xp, testcase
(Reporter)

Comment 1

18 years ago
Created attachment 8443 [details]
testcase - watch console for js error when page loads
(Reporter)

Comment 2

18 years ago
d'oh - actual js code:

<script LANGUAGE=JavaScript>
diceFrame = new Array ();
totalFrames = 6;
allMediaLoaded = true;

for (var frameNo = 1; frameNo <= totalFrames; frameNo++) {
    diceFrame [frameNo] = new Image (90,90);
    diceFrame [frameNo].src = 'frame' + frameNo + '.gif';
}

for (var frameNo = 1; frameNo <= totalFrames && allMediaLoaded; frameNo++)
    allMediaLoaded = allMediaLoaded && diceFrame [frameNo].complete; // problem

alert(diceFrame [frameNo].complete);
</script>

Comment 3

18 years ago
Actually, it's saying that the interface doesn't have this property. 
I assume it needs to be implemented. --> Dom Level 0 jst/desale

<script LANGUAGE=JavaScript>
  var foo = new Image (90,90);
  foo.src = 'whatever.gif';
  var bar = foo.complete; // problem
  alert(bar);
</script>

Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
(Assignee)

Comment 4

18 years ago
This should IMO be fixed for beta2, adding keyword.
Keywords: nsbeta2

Comment 5

18 years ago
This is needed for beta2; giving PDT approval.
Whiteboard: [nsbeta2+]
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 6

18 years ago
Almost works in my tree, still needs some work but it's getting close.
OS: Windows 2000 → All
Hardware: PC → All
Whiteboard: [nsbeta2+] → [nsbeta2+][jst]
Target Milestone: --- → M16
(Assignee)

Comment 7

18 years ago
*** Bug 28277 has been marked as a duplicate of this bug. ***

Comment 8

18 years ago
M16 has been out for a while now, these bugs target milestones need to be 
updated.
(Assignee)

Comment 9

18 years ago
While I do have an almost functioning fix for the img.complete on images created
in JS problems I don't feel comfortable with checking that in at this point, in
stead I'll fix the incorrect exception now and leave the img.complete problem to
bug 28277...
(Assignee)

Updated

18 years ago
Whiteboard: [nsbeta2+][jst] → [nsbeta2+][ETA 7/11]
(Assignee)

Comment 10

18 years ago
The fix for the exception is checked in, marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 11

18 years ago
Verified with 2000-07-12-15 on Win-95.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.