Bug 160065 - Parameter to Document.createEvent() should be mandatory
Summary: Parameter to Document.createEvent() 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/#document
Keywords: WebExposed
Depends on:
Blocks:
 
Reported: 2016-07-21 16:54 PDT by Chris Dumez
Modified: 2016-07-21 20:30 PDT (History)
10 users (show)

See Also:


Attachments
Patch (10.71 KB, patch)
2016-07-21 19:19 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-21 16:54:26 PDT
Parameter to Document.createEvent() should be mandatory as per the specification:
- https://dom.spec.whatwg.org/#document

We already throw anyway when the parameter is omitted because we use "undefined" as event type, which is invalid. However, we throw the wrong exception.

Firefox and Chrome agree with the specification here.
Comment 1 Chris Dumez 2016-07-21 19:19:41 PDT
Created attachment 284299 [details]
Patch
Comment 2 Chris Dumez 2016-07-21 20:30:17 PDT
Comment on attachment 284299 [details]
Patch

Clearing flags on attachment: 284299

Committed r203550: <http://trac.webkit.org/changeset/203550>
Comment 3 Chris Dumez 2016-07-21 20:30:23 PDT
All reviewed patches have been landed.  Closing bug.