Bug 4331 - dispatchEvent should raise an exception
Summary: dispatchEvent should raise an exception
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-08 01:05 PDT by Anders Carlsson
Modified: 2019-02-06 09:03 PST (History)
1 user (show)

See Also:


Attachments
Throw exception (8.88 KB, patch)
2005-08-08 01:06 PDT, Anders Carlsson
andersca: review-
Details | Formatted Diff | Diff
Better solution (19.80 KB, patch)
2005-08-08 14:02 PDT, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2005-08-08 01:05:19 PDT
If the event passed to dispatchEvent is null or unitialized, UNSPECIFIED_EVENT_TYPE_ERR should be raised.
Comment 1 Anders Carlsson 2005-08-08 01:06:11 PDT
Created attachment 3275 [details]
Throw exception
Comment 2 Anders Carlsson 2005-08-08 02:10:48 PDT
Comment on attachment 3275 [details]
Throw exception

I think the check in dispatchEvent is wrong so I'll mark it review- for now.
Comment 3 Anders Carlsson 2005-08-08 14:02:33 PDT
Created attachment 3284 [details]
Better solution
Comment 4 Darin Adler 2005-08-08 15:17:02 PDT
Comment on attachment 3284 [details]
Better solution

Instead of this:

    evt->type().isNull() || evt->type() ==""

should use:

    evt->type().isEmpty()

Otherwise, r=me.
Comment 5 Justin Garcia 2005-08-09 14:27:53 PDT
Landed this, with the change suggested by Darin
Comment 6 Lucas Forschler 2019-02-06 09:03:01 PST
Mass moving XML DOM bugs to the "DOM" Component.