RESOLVED INVALID 20126
unset listener: should it be null or undefined ?
https://bugs.webkit.org/show_bug.cgi?id=20126
Summary unset listener: should it be null or undefined ?
Ariya Hidayat
Reported 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.
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
patch to make unset listener returns undefined instead of null (1.86 KB, patch)
2008-07-21 10:51 PDT, Ariya Hidayat
no flags
Ariya Hidayat
Comment 1 2008-07-21 10:50:08 PDT
Created attachment 22412 [details] patch to make unset listener returns undefined instead of null
Ariya Hidayat
Comment 2 2008-07-21 10:50:34 PDT
Ariya Hidayat
Comment 3 2008-07-21 10:51:55 PDT
Created attachment 22413 [details] patch to make unset listener returns undefined instead of null
Ahmad Saleem
Comment 4 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!
Ryosuke Niwa
Comment 5 2022-08-20 00:44:54 PDT
All browsers return null in this case now.
Note You need to log in before you can comment on or make changes to this bug.