RFE - trying to retrieve an scope of JS object from DOM 2 event.

NEW
Unassigned

Status

()

Core
Event Handling
P3
normal
18 years ago
9 years ago

People

(Reporter: /\/\arcio Galli, Unassigned)

Tracking

Trunk
Future
x86
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

18 years ago
Looking for input and comments, and if applicable a future enhancement.

The above code, is a basic JS code that creates a red window. This red window is
a DIV that is a visual representation of a JS window object.

Start function creates an instance of the window and then call the register
method. The point is:

**
Register method adds an event listener (for mousedown) trying to make the mouse
down operation calling a method inside the scope of the window object. For
example, trying to close that window (the JS object must be notified).

Note that the register method does:

divelement.addEventListener("mousedown",this.close,true);

---
When the user click mouse down, close method is correctly called. But when I
evaluate the this (inside this.close scope), this is a reference for the DIV
element, not the object.

Comment 1

18 years ago
I am seeing this:
Platform: PC
OS: Windows 98
Mozilla: Build #2000120604 M18 Trunk Build

Marking NEW though it may be a code issue.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

18 years ago
Interesting.  I'll look at it later if I can.


This bug has been marked "future" because the original netscape engineer
working on this is over-burdened. If you feel this is an error, that you or
another known resource will be working on this bug,or if it blocks your work
in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: --- → Future
QA Contact: lorca → gerardok
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.

Comment 4

17 years ago
QA contact updated
QA Contact: gerardok → madhur

Updated

16 years ago
QA Contact: madhur → rakeshmishra

Updated

16 years ago
QA Contact: rakeshmishra → trix

Comment 5

15 years ago
.
Assignee: joki → saari
QA Contact: trix → ian
Assignee: saari → nobody
QA Contact: ian → events
You need to log in before you can comment on or make changes to this bug.