this object in BODY click handler is not document.body and not an HTMLBodyElement

VERIFIED DUPLICATE of bug 3140

Status

()

VERIFIED DUPLICATE of bug 3140
18 years ago
18 years ago

People

(Reporter: martin.honnen, Assigned: joki)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

18 years ago
With M0.8.1 I get strange results with 

<body onclick="alert('this == document.body: ' + (this == document.body) + '; 
this.nodeName: ' + this.nodeName + '; this.constructor: ' + this.constructor + 
'; this.innerHTML: ' + this.innerHTML);">

When I click the body the alert shows that
  this == document.body
is
  false
that
  this.nodeName
is
  undefined
that
  this.constructor
is
  Object
and not
  HTMLBodyElement
and that innerHTML is undefined.
(Reporter)

Comment 1

18 years ago
Created attachment 29141 [details]
bug demo (click into the document)
(Reporter)

Comment 2

18 years ago
Please ignore the first attachment 
(http://bugzilla.mozilla.org/showattachment.cgi?attach_id=29141). I uploaded the 
wrong file.
(Reporter)

Comment 3

18 years ago
Created attachment 29142 [details]
bug demo(click into document to see problem)
Reassigning to joki, I think this is a dup...
Assignee: jst → joki
Component: DOM HTML → DOM Events
(Assignee)

Comment 5

18 years ago
Yes, a dupe for a while.  The object in question that's being hit is the window, 
which until 6.0 was always analogous with the body.

*** This bug has been marked as a duplicate of 3140 ***
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → DUPLICATE

Comment 6

18 years ago
VERIFIED dup
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.