From e42166a5bacbd034538b0df9616eefad5c90e26e Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 4 Oct 2018 21:07:48 +0200 Subject: Make all arguments to init*Event() optional except the first This resolves #810. --- dom/webidl/MessageEvent.webidl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'dom/webidl/MessageEvent.webidl') diff --git a/dom/webidl/MessageEvent.webidl b/dom/webidl/MessageEvent.webidl index 548f14520..be5022d67 100644 --- a/dom/webidl/MessageEvent.webidl +++ b/dom/webidl/MessageEvent.webidl @@ -43,10 +43,14 @@ interface MessageEvent : Event { [Pure, Cached, Frozen] readonly attribute sequence ports; - void initMessageEvent(DOMString type, boolean bubbles, boolean cancelable, - any data, DOMString origin, DOMString lastEventId, - (WindowProxy or MessagePort)? source, - sequence ports); + void initMessageEvent(DOMString type, + optional boolean bubbles = false, + optional boolean cancelable = false, + optional any data = null, + optional DOMString origin = "", + optional DOMString lastEventId = "", + optional (WindowProxy or MessagePort)? source = null, + optional sequence ports = []); }; dictionary MessageEventInit : EventInit { -- cgit v1.2.3