-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"create an event" does not work with required members #600
Comments
Why not let "create an event" just take a dictionary override:
And then change:
So then it just use the passes dictionary? |
That would probably work, but then you can't use "fire an event" for those events. And if we wanted to enable that, which would make sense, we'd have to redefine how the IDL attributes are initialized and refactor all callers. (Multiple optional arguments also gets a little ugly and might warrant some refactoring of the callers.) |
In particular as defined today step 3
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.
The text was updated successfully, but these errors were encountered: