[whatwg/dom] "create an event" does not work with required members (#600)

In particular as defined today step 3

> Let defaultEventInitDict be the result of converting the JavaScript value undefined to the dictionary type accepted by eventInterface’s constructor. (This dictionary type will either be EventInit or a dictionary that inherits from it.)

would throw, which is a problem as https://searchfox.org/mozilla-central/search?q=required&path=Event.webidl suggests there's various events out there that have a required dictionary member.

We can deal with it failing, but that does seem to suggest that if you have a required dictionary member, you need to supply defaults in some other way than IDL. Alternatively we need to allow passing these members in some way to "fire an event" et al which would be the second refactoring to that whole operation within a rather sad short time period.

-- 
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/600

Received on Wednesday, 14 March 2018 14:56:27 UTC