Skip to content

Commit

Permalink
Make initEvent()/initCustomEvent() arguments optional except the first
Browse files Browse the repository at this point in the history
This aligns the standard with WebKit and gets it closer to Blink.

Tests: web-platform-tests/wpt#5043.

Fixes #387.
  • Loading branch information
Chris Dumez authored and annevk committed Mar 7, 2017
1 parent 56a4d6b commit 2358735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ interface Event {
[Unforgeable] readonly attribute boolean isTrusted;
readonly attribute DOMTimeStamp timeStamp;

void initEvent(DOMString type, boolean bubbles, boolean cancelable); // historical
void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
};

dictionary EventInit {
Expand Down Expand Up @@ -817,7 +817,7 @@ incapable of setting {{Event/composed}}. It has to be supported for legacy conte
interface CustomEvent : Event {
readonly attribute any detail;

void initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any detail);
void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null);
};

dictionary CustomEventInit : EventInit {
Expand Down

0 comments on commit 2358735

Please sign in to comment.