Closed
Bug 9544
Opened 27 years ago
Closed 19 years ago
[FEATURE] captureEvents() method doesn not work.
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
DUPLICATE
of bug 330494
mozilla1.1alpha
People
(Reporter: desale, Assigned: joki)
References
Details
(Keywords: testcase, Whiteboard: [ADT need info][TESTCASE] window.captureEvents() must be implemented (or is not working))
Attachments
(2 files)
Method window.captureEvents() is returning undefined. So either its not
implemented or not working.
PRODUCT: Seamonkey [Apprunner/Viewer]
BUILD: 07-08-08.
OS: Win95, WinNT, Win98, MacOS.
STEPS TO REPRODUCE:
1] Please copy code I'm providing. Save as HTML file.
2] Open this HTML file in Apprunner as well as Viewer.
3] You'll see the return value of window.captureEvents() getting printed on
screen.
NOTE: In actual code [testcase] the method is used without parantheses in order
to know what it is exactly.
EXPECTED RESULTS:
window.captureEvents() = function captureEvents() { [native code] }
ACTUAL RESULTS:
window.captureEvents() = undefined
CODE:
<html>
<head>
<title>Test Page</title>
</head>
<body>
<form name="workform">
<SCRIPT LANGUAGE="JavaScript">
document.writeln("window.captureEvents() = ");
document.writeln(window.captureEvents);
</SCRIPT>
</form>
</body>
</html>
END OF CODE
Comment 1•27 years ago
|
||
Updated•27 years ago
|
Whiteboard: [TESTCASE] window.captureEvents() must be implemented (or is not working)
Comment 2•27 years ago
|
||
desale's testcase cannot be simplified further. Updated Status to "[TESTCASE]
blah" standard.
Updated•27 years ago
|
Assignee: vidur → joki
Comment 3•27 years ago
|
||
An event problem for Tom Pixley.
| Reporter | ||
Updated•27 years ago
|
Summary: Method window.captureEvents() is not working or not implemented. → captureEvents() method not implemented.
| Reporter | ||
Comment 4•27 years ago
|
||
Same thing is happening with document.captureEvents(), so it means this method
not implemented for any object.
Changing Summary.
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M13
Updated•26 years ago
|
Summary: captureEvents() method not implemented. → [FEATURE] captureEvents() method not implemented.
Target Milestone: M13 → M14
Comment 7•26 years ago
|
||
Moving M14.
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M14 → M13
| Assignee | ||
Comment 8•26 years ago
|
||
Moving 4.x event system features back to M13
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M13 → M14
| Assignee | ||
Comment 9•26 years ago
|
||
Well the 4.x event stuff is done but its untested. Given that I had to make
several changes to general event handling I think I'll take the conservative
road this time and save this till the tree opens for M14.
Comment 10•26 years ago
|
||
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
| Assignee | ||
Comment 11•26 years ago
|
||
Should be fixed now, modulo any weird compatibility stuff my testing missed.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 13•25 years ago
|
||
The captureEvents() method is *implemented* now, but it doesn't appear to
*work*. (at least not in Moz. 0.8.1) Perhaps this bug needs to be reopened.
The attached testcase shows that the event handler is being triggered during
event bubbling rather than as a true event capture.
Note that there are substantial incompatibilities between Netscape 4 capturing
and DOM capturing (for example capture events in NN4 don't propagate by default
but they do in the DOM.) Instead of struggling to get the compatiblity just
right, you could also make the executive decision to formally renounce the
Netscape 4 event capturing model.
Comment 14•25 years ago
|
||
| Reporter | ||
Comment 15•25 years ago
|
||
joki, according to David Flanagan's comments & the testcase provided by David,
I'm re-opening this bug.
Changing Summary of the bug.
any thoughts joki ?
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Summary: [FEATURE] captureEvents() method not implemented. → [FEATURE] captureEvents() method doesn not work.
| Reporter | ||
Comment 16•24 years ago
|
||
Nominating this one for nsbeta1. method is working wrong way, so backward
compatibility of javascript is getting defeated.
Keywords: nsbeta1
Comment 17•24 years ago
|
||
ADT triage team would like to know what user-visible problems this is causing.
Whiteboard: [TESTCASE] window.captureEvents() must be implemented (or is not working) → [ADT need info][TESTCASE] window.captureEvents() must be implemented (or is not working)
| Reporter | ||
Comment 18•24 years ago
|
||
This bug will matter when user wants to create his predefined "Event Handlers"
on certain events. Please see testcase attached by David Flanagan which shows
how it could be used.
Comment 19•24 years ago
|
||
we're too close to 1.0 for this.
| Reporter | ||
Comment 20•24 years ago
|
||
Nominating again for RTM.
Comment 21•23 years ago
|
||
captureEvents is not necessary for mozilla.
captureEvents(Event.CLICK)
onclick = function(e){alert(e);};
captureEvents(Event.CLICK) does nothing.
This feature has a problem with event capturing object detection script. Consider:
if(window.event){
// IE/Opera stuff.
}
else if(window.captureEvent){
// NS4 stuff.
}
See?
Please un-implement captureEvents.
alert(window.captureEvents) // "undefined" in mozilla
Comment 23•23 years ago
|
||
ccing people who know the event system....
Is there a good reason for us to keep this function defined if it does nothing
useful?
Comment 24•23 years ago
|
||
It's a question of what breaks more. The fact that the method is there but does
nothing, or that the method isn't there at all and causes code that calls it to
stop running alltogether when it tries to call it. It's a hard call, I don't
know the answer, but given that I don't see any URL's to any real sites that are
broken due to this, I think I'd rather leave it as is.
Comment 25•23 years ago
|
||
Well, if it's supposed to do nothing, could we document that and change it
accordingly? At the moment it goes and sets flags and stuff; it's just that
those flags don't seem to affect anything....
Comment 26•23 years ago
|
||
>given that I don't see any URL's to any real sites that are
>broken due to this, I think I'd rather leave it as is.
The proverbial "If it ain't broke, don't fix it"
VS.
Things can always be improved.
captureEvents is part of the NS4 event model. I think it should not be included
in Mozilla as a do-nothing placeholder feature. Removing captureEvents would
probably not break any sites. If it did, then I'd say those sites are pretty
poorly programmed. Moreover, such sites are damned lucky to get their ns4 code
to work with Mozilla.
The domref docs document captureEvents and releaseEvents. This should cease.
Comment 21 was prompted from a problem I had. I was developing a script to work
in as many browsers as possible and I was quite surprised when Mozilla was
executing the captureEvents code. I found that Mozilla had tested positive for
captureEvents and decided to report the problem, but first I searched the
bugzilla database and found this.
By eliminating captureEvents, the source code for this feature would not need
maintenance. Eliminating detritus from programs is a good thing, right?
Comment 27•21 years ago
|
||
I've updated bug 132132 before noticing this bug.
captureEvents (and releaseEvents and routeEvent) was not working according to NS
4 specs as soon as NS 6.1. Therefore, we're speaking of absence of support or
inadequate support for at least 5 years with new releases. We're now in an era
where Opera 7+, Safari 1.x, Mozilla 1.x and Firefox 1.x support DOM 2 events,
not the old (9 years old, deprecated) NS 4.x event model. Even attachment 38685 [details]
does not work as expected to NS 4.x specs in Opera 8 final release.
IMO, the decision to make is obvious here. FWIW, handleEvent() is no longer
listed in any object and has been replaced everywhere needed by DOM 2 Events
dispatchEvent().
Comment 28•19 years ago
|
||
I am resolving this bug as DUPLICATE of bug 330494. In bug 330494 at comment #c22, you'll see that the patch drops support for captureEvents() and that a semi-convenient message is displayed in the error console.
Please do not reopen this bug: this bug is really a duplicate of bug 330494.
Thank you.
Status: REOPENED → RESOLVED
Closed: 26 years ago → 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•