Bug 20126 - unset listener: should it be null or undefined ?
Summary: unset listener: should it be null or undefined ?
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Normal
Assignee: Ariya Hidayat
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-21 10:48 PDT by Ariya Hidayat
Modified: 2022-08-20 00:44 PDT (History)
5 users (show)

See Also:


Attachments
patch to make unset listener returns undefined instead of null (2.37 KB, patch)
2008-07-21 10:50 PDT, Ariya Hidayat
no flags Details | Formatted Diff | Diff
patch to make unset listener returns undefined instead of null (1.86 KB, patch)
2008-07-21 10:51 PDT, Ariya Hidayat
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ariya Hidayat 2008-07-21 10:48:16 PDT
If a listener for an event, e.g. onresize, is not installed, should it ("document.body.onresize") return null or undefined?

Based on my checks, Firefox 3 and Opera 9.5 return undefined while IE 7 gives null.
Comment 1 Ariya Hidayat 2008-07-21 10:50:08 PDT
Created attachment 22412 [details]
patch to make unset listener returns undefined instead of null
Comment 2 Ariya Hidayat 2008-07-21 10:50:34 PDT
Related khtml bug:
http://bugs.kde.org/show_bug.cgi?id=166943
Comment 3 Ariya Hidayat 2008-07-21 10:51:55 PDT
Created attachment 22413 [details]
patch to make unset listener returns undefined instead of null
Comment 4 Ahmad Saleem 2022-08-20 00:37:42 PDT
This commit removed - JSEventTargetNode.cpp, which this patch was trying to modify:

https://github.com/WebKit/WebKit/commit/1292a4346f561b4490bbe1319c89fef428d746cf

Is anything else needed here? Thanks!
Comment 5 Ryosuke Niwa 2022-08-20 00:44:54 PDT
All browsers return null in this case now.