Skip to content

Support onLoad event for FileReader #330

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

Closed
maple135790 opened this issue Dec 25, 2024 · 1 comment
Closed

Support onLoad event for FileReader #330

maple135790 opened this issue Dec 25, 2024 · 1 comment

Comments

@maple135790
Copy link
Contributor

In MDN, FileReader has a event called onLoad, but unfortunately in current main b55f343, there is no such event to listen to.

Current workaround would need to write a custom Extension Method, mimic the the onLoadEnd event which is currently inside main

extension on FileReader {
  Stream<ProgressEvent> get onLoad =>
      EventStreamProviders.loadEvent.forTarget(this);
}
@srujzs
Copy link
Contributor

srujzs commented Jan 2, 2025

Thanks for filing! Feel free to add a PR adding what you wrote above to

extension FileReaderEventGEtters on FileReader {
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants