-
Notifications
You must be signed in to change notification settings - Fork 440
Parameterize ProgressEvent #707
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
9021bfc
to
4238c0c
Compare
4238c0c
to
8a8bb00
Compare
Is this useful anywhere else? I expected that lots of other event types would want to have custom targets? |
Might be better to start rather than doing all in once. IMO this will at least prevent a future breaking change "Where is my FileReaderProgressEvent" as we already saw one. |
If this is a start that will have some follow-up, I want to understand what the follow-up will be. Are there other subtypes of ProgressEvent that will provide different arguments to If the only subtype of ProgressEvent is FileReader, then I think it's too expensive and complex to create a generic type for just one case. |
Current users of ProgressEvent in lib.d.ts include ApplicationCache, Document, GlobalEventHandlers, and XMLHttpRequest, |
How would ApplicationCache customise ProgressEvent.target? Would |
Yep, and This can be generalized for nearly all Event sub-interfaces, so we even could do some automation in the future rather than manual |
OK, that makes sense. Can you make the change for ApplicationCache, Document, GlobalEventHandlers, and XMLHttpRequest in this PR? |
8969c5b
to
320eb36
Compare
320eb36
to
e4a944d
Compare
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.
One naming request and one question.
@sandersn, how about this?