-
Notifications
You must be signed in to change notification settings - Fork 156
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
Handle remove from progress in its own mutation #2225
Conversation
const promise = new Promise((resolve, reject) => { | ||
xhr.onload = e => { | ||
xhr.status >= 200 && xhr.status < 400 ? resolve(e) : reject(new Error(xhr.statusText)) | ||
} | ||
xhr.onloadend = e => { |
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.
is this polyfilled for IE and co ? see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onloadend
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.
AFAIK using onload should be enough here ?
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.
Tested it in ie11 (Win 7) - works.
The good thing about onloadend is that it's triggered also in case it failed.
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.
ok, so if it works it means we have a polyfill in place.
note that chrome also doesn't support this property, mind testing there as well ?
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.
Already tested. Works in IE11, FF, chrome, safari and edge.
0dd6023
to
a0c9ed4
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.
👍
Description
Move remove from progress into its own method, use id instead of name to find the right progress and call the action on requests loadend event.
How Has This Been Tested?
Types of changes
Checklist: