Bug 160320 - Parameters to Event.initEvent() should be mandatory
Summary: Parameters to Event.initEvent() should be mandatory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://dom.spec.whatwg.org/#interfac...
Keywords: WebExposed
Depends on: 161162 163967
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-28 14:55 PDT by Chris Dumez
Modified: 2016-10-25 12:48 PDT (History)
8 users (show)

See Also:


Attachments
Patch (14.26 KB, patch)
2016-07-28 14:58 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-07-28 14:55:51 PDT
Parameters to Event.initEvent() should be mandatory:
- https://dom.spec.whatwg.org/#interface-event

Firefox agrees with the specification. Chrome does not.
Comment 1 Chris Dumez 2016-07-28 14:58:18 PDT
Created attachment 284822 [details]
Patch
Comment 2 Darin Adler 2016-07-28 15:55:20 PDT
Comment on attachment 284822 [details]
Patch

Who could possibly love those two mandatory booleans? Yuck.
Comment 3 Chris Dumez 2016-07-28 15:58:59 PDT
(In reply to comment #2)
> Comment on attachment 284822 [details]
> Patch
> 
> Who could possibly love those two mandatory booleans? Yuck.

Nowadays, people are supposed to use the Event constructors that take a dictionary instead of those init functions.
Comment 4 WebKit Commit Bot 2016-07-28 16:16:21 PDT
Comment on attachment 284822 [details]
Patch

Clearing flags on attachment: 284822

Committed r203848: <http://trac.webkit.org/changeset/203848>
Comment 5 WebKit Commit Bot 2016-07-28 16:16:26 PDT
All reviewed patches have been landed.  Closing bug.