Skip to content

Attempt on fixing abort events for fetch()#42

Merged
trek merged 2 commits intopretenderjs:masterfrom
raido:fix-aborting-event-order
Oct 29, 2018
Merged

Attempt on fixing abort events for fetch()#42
trek merged 2 commits intopretenderjs:masterfrom
raido:fix-aborting-event-order

Conversation

@raido
Copy link
Contributor

@raido raido commented Sep 10, 2018

Resolves #41 hopefully.

this.dispatchEvent(new _Event("load", false, false, this));
this.dispatchEvent(new _Event("loadend", false, false, this));
}
this.dispatchEvent(new _Event("loadend", false, false, this));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually bug now, because every time _readyStateChange is called this "loadend" gets dispatched. For example FakeXMLHttpRequest.OPEN is dispatched and follows with loadend.

@raido
Copy link
Contributor Author

raido commented Oct 5, 2018

@trek

@trek trek merged commit f0adab3 into pretenderjs:master Oct 29, 2018
@raido raido deleted the fix-aborting-event-order branch October 31, 2018 20:05
@ghost
Copy link

ghost commented Jan 5, 2019

any chance of releasing v2.0.1 to npm? I think I need this fix

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants