-
Notifications
You must be signed in to change notification settings - Fork 447
Add focusin/focusout to GlobalEventHandlers #696
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
Conversation
So those events are without IDL attributes, and currently we only supports events handlers with corresponding attributes, so this goes tricky... We have to fix the code so that we can add attribute-less events including |
Good to know @saschanaz , I was not sure, the references around Thanks for the clarification, so apparently the work is around these lines of the emitter. I'll revert the added properties and try to work something out in the emitter. |
@saschanaz I have now updated the PR to allow adding |
The master branch is currently failing (probably by TypeScript nightly behavior change). Try fixing line 200 of |
Thanks @saschanaz, Ci fixed! I'll remove the "WIP" from the title, this PR is good to be reviewed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I once thought maybe we could fix iNameToEhList
instead so that it would map event-to-property rather than current property-to-event, and found it's more complicated because some events are not in GlobalEventHandlers
bun is rather spread into specific element interfaces.
Good point @saschanaz, and thanks for the approval! Ping @RyanCavanaugh as this is probably ready to be merged. |
Keeping the PR alive, ping perhaps @sandersn ? :) |
* Add generic support to `Element.closest()` * Update widlprocess.ts #696 (comment) * Add generated files
According to microsoft/TypeScript#30716 focusin/focusout are missing from
GlobalEventHandlersEventMap
.I have added
onfocusin
andonfocusout
toGlobalEventHandlers
and the eventsfocusin
andfocusout
, which were supposed to be mapped, but they haven't shown up inGlobalEventHandlersEventMap
, so I could use a small help!@saschanaz, I've searched in the history and I noticed that in #674 you've managed to add
deviceorientationabsolute
toWindowEventMap
. How did you achieve that? I think I'm missing some detail here...Also, I noticed that
onfocus
has a comment explaining its purpose, would it make sense to include comments also foronfocusin
andonfocusout
?Fixes microsoft/TypeScript#30716