Imagine I am utilizing a Promisified
API for executing an Ajax Request
, would the event-loop
still resort to calling the basic
XMLHttpRequest.onreadystatechange
?
Although using Promisfying enables coding in a sequential manner, essentially it is still relying on the traditional mechanisms behind the scenes. It's somewhat akin to the utilization of the class
syntax in ECMASCRIPT 6
. Ultimately, are the core API's remaining unchanged?
I'm struggling to comprehend how we could directly link a Promise
with an event-loop
, as there needs to be some sort of logic in place that can "resolve" or "reject", necessitating a simple wrapper [which could potentially be implemented as a promise, although it might result in an excess of promises]?