Open Bug 641477 Opened 15 years ago Updated 3 years ago

Throw UNSPECIFIED_EVENT_TYPE_ERR if event isn't initialized before dispatching

Categories

(Core :: DOM: Events, defect)

x86
All
defect

Tracking

()

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
This is way more complicated than I was hoping for, but we just didn't have EventException.
Attachment #519160 - Flags: review?(jonas)
Attachment #519160 - Attachment is obsolete: true
Attachment #519160 - Flags: review?(jonas)
Attachment #519166 - Flags: review?(jonas)
(In reply to comment #1) > Created attachment 519160 [details] [diff] [review] > patch > > This is way more complicated than I was hoping for, but > we just didn't have EventException. And we shouldn't have added it without a use case.
I don't understand that comment. I think there was an agreement how event creation/dispatch should work; throw exception if the event isn't initialized before dispatching. And the use case is sane API.
Throwing an exception is fine, implementing EventException is unnecessary bloat.
Well, that is what the current specification requires, and that is what is implemented in other engines.
At least Google [1], and I assume Opera as well, are willing to change, and Doug hasn't replied to the feedback yet. It seems rather strange to implement it now, given that the spec has required it for over a decade. [1] http://lists.w3.org/Archives/Public/www-dom/2011JanMar/0078.html
Well, which error code should be thrown? Currently Web DOM Core doesn't seem to define that case at all.
http://hg.mozilla.org/mozilla-central/rev/22a798b4a012 This anyway now fixed. But if there will be a spec which specifies some other error code and deprecates EventException, I'd be happy to back out that and implement the new approach.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: