-
Notifications
You must be signed in to change notification settings - Fork 1.4k
DX: Event Handler Types #839
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
| 'document:onVisible'?: QRL<(event: Event, el: Element) => any>; | ||
|
|
||
| 'document:onVisibilityChange$'?: (event: Event, el: Element) => any; | ||
| 'document:onVisibilityChangeQrl'?: QRL<(event: Event, el: Element) => any>; |
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.
We can remove too
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.
Just to clarify, remove both of these events or just the Qrl variant?
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.
the Qrl variant
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.
Cool. Also, document:onLoad$ and document:onScroll$ should already be generated from the new types. Should I delete those too?
|
Love this PR! lets get it done and merge! |
|
Yep! It's still working for me. But now unknown/custom events will have type Event instead of any. 👍 |
|
It's a trick React uses for the same problem: |
|
Amazing! going to merge another PR first, then this one! |

What is it?
Description
Adds autocompletions for host:on, document:on, window:on and preventDefault: attributes.
Use cases and why
Checklist: