Closed
Bug 358092
Opened 18 years ago
Closed 18 years ago
captureEvents(), releaseEvents(): False deprecation warning for scripts based on object-detection
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
DUPLICATE
of bug 358091
People
(Reporter: walter2615, Unassigned)
Details
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.
Reporter | ||
Comment 1•18 years ago
|
||
*** This bug has been marked as a duplicate of 358091 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•