Bug 20126 - unset listener: should it be null or undefined ?
Summary: unset listener: should it be null or undefined ?
Status: ASSIGNED
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: 2010-06-10 15:48 PDT (History)
2 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