Closed Bug 358091 Opened 18 years ago Closed 17 years ago

captureEvents(), releaseEvents(): False deprecation warning for scripts based on object-detection

Categories

(Core :: DOM: Events, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: walter2615, Unassigned)

References

Details

Attachments

(1 file)

User-Agent: Opera/9.02 (Windows NT 5.1; U; en) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 Presently, the JS-console-warning "Use of captureEvents() is deprecated" without reason is displayed for scripts based on object detection rather than on browser detection. That is, even if a script doesn't rely on these functions, but rather checks for their existence before calling them. This is annoying for JS developers who receive a lot of false alarms by users, though their scripts aren't really broken (yes, I'm a victim of this :)). And it is disturbing for less-experienced JS developers. Reproducible: Always Steps to Reproduce: JavaScript: g_oldMoveFunc = document.onmousemove; // Store reference to previous handler if(document.captureEvents) document.captureEvents(Event.MOUSEMOVE); document.onmousemove = someMoveFunc; Actual Results: A false "Use of captureEvents() is deprecated" warning is written to the JS console. Expected Results: The warning should not appear for the JS lines above. Reason: If a browser doesn't support captureEvents(), line 2 will evaluate to false, and the browser cannot enter line 3. Nothing. Just ignore line 3.
*** Bug 358092 has been marked as a duplicate of this bug. ***
Assignee: nobody → events
Component: General → DOM: Events
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
This refers to a pre-DOM Level 2 Events specification for how Gecko handled events. These methods really are deprecated, but apparently still supported. Websites using them should be evangelized into using the proper DOM 2 Events methods (addEventListener), as these methods may actually be *removed* altogether in the future. Recommend INVALID.
IMO, the warning should happen since captureEvents *is* deprecated, and the method call doesn't do *anything* in trunk builds. (It still does do "something" in 1.8) captureEvents was implemented in Netscape 4 and that browser sure is pretty obsolete.
Blocks: 330494
Hi, the error occurs if using firefox 2.0.0.7, and occurs not if using IE6. This issue prevents users from login to oracle metalink. Regards Günter
Sorry, but this is invalid. on 2.x builds captureEvents is (sort of) supported, the message is just a warning that web app is using *deprecated* method. Note, the message doesn't say *obsolete* method or anything like that. And this sure doesn't prevent any functionality. If you can't login to "oracle metalink", the problem is somewhere elsewhere.
Status: UNCONFIRMED → RESOLVED
Closed: 17 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: