Add focusin/focusout to GlobalEventHandlers#696
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! |
saschanaz
left a comment
There was a problem hiding this comment.
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
onfocusinandonfocusouttoGlobalEventHandlersand the eventsfocusinandfocusout, 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
deviceorientationabsolutetoWindowEventMap. How did you achieve that? I think I'm missing some detail here...Also, I noticed that
onfocushas a comment explaining its purpose, would it make sense to include comments also foronfocusinandonfocusout?Fixes microsoft/TypeScript#30716