W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2018

Re: throw vs promise reject

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 17 Sep 2018 17:43:03 -0400
To: public-webapps@w3.org
Message-ID: <9f2921ef-b227-9441-60d4-869613cfff62@mit.edu>
On 9/17/18 6:44 AM, Guru Partap Khalsa wrote:
> What is the reasoning for XMLHttpRequest to "throw" rather than 
> rejecting a promise?

The API predates promises.  If you want a Promise-based fetching API, 
you should use fetch().

-Boris
Received on Monday, 17 September 2018 21:43:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:15:15 UTC