pretenderjs / FakeXMLHttpRequest

A fake XMLHttpRequest object for testing in browsers
MIT License
65 stars 46 forks source link

Support overrideMimeType() method #23

Closed simonihmig closed 8 years ago

simonihmig commented 8 years ago

The FakeXMLHttpRequest class is missing the overrideMimeType method, which is part of the XMLHttpRequest specification: https://www.w3.org/TR/XMLHttpRequest/#the-overridemimetype()-method. Applications or libraries relying on this method will get an "undefined is not a function" exception when using FakeXMLHttpRequest.

This PR adds the missing method and mimics its original behaviour.

trek commented 8 years ago

Thanks!