Re: [whatwg/dom] initEvent should not require three parameters (#387)

I would like to see the change across the board as well. In Blink, these are the `init*Event()` methods:
* initCompositionEvent
* initCustomEvent
* initDeviceMotionEvent
* initDeviceOrientationEvent
* initEvent
* initKeyboardEvent
* initMessageEvent
* initMouseEvent
* initMutationEvent
* initStorageEvent
* initTextEvent
* initUIEvent

https://software.hixie.ch/utilities/js/live-dom-viewer/saved/4873 is a quick test that confirms what our IDL files suggest, namely that `initCustomEvent` is the only one that requires any argument, namely all 4. Its 4th argument is of type `any`, so making that default to null wouldn't be an issue.

I checked all of the rest, and much to my surprise and delight didn't find any cases where an event interface member would have to be made nullable to accommodate this change. (I found many things like this when looking at event init dicts with no required members.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/387#issuecomment-278478136

Received on Wednesday, 8 February 2017 22:10:33 UTC