Cancelable JavaScript promises cancelled

Cancelable JavaScript promises cancelled

The proposed feature would have given developers more control over requests in programs, but Google pushed back


In a twist of irony, a cancelable promises capability has been cancelled as a planned addition to JavaScript itself.

The proposal had been championed by Google's Dominic Denicola but had remained in an early stage of development, according to Mozilla. Denicola declined to comment on the proposal's withdrawal except to say it was a "difficult subject." In recent comments in GitHub repo, he said the proposal had met "significant opposition from within Google."

The feature would have given developers the ability to abort a promise, a Mozilla representative said. "A prominent use case is to be able to cancel possibly longstanding requests, such as fetch requests." Cancelable promises had been proposed to the ECMA TC-39 committee overseeing the standardization of JavaScript.

While Mozilla declined to speculate on why the proposal was retracted, the company hopes another effort is made in this vein. "What has been retracted is a particular proposed solution," Mozilla said. "We believe the idea of making promises cancelable, in particular making HTML fetch cancelable, is still very much desired. We anticipate there will be other proposals."

Promises in JavaScript provide for asynchronous connection-handling, for scheduling of how code works with JavaScript APIs and functions. Comments on a Hacker News chat thread referred to cancelable promises as having no obvious way to accomplish it and questioned whether it would foment complexity and compatibility issues. For the time being, cancelable promises has met the same fate as object.observe, a JavaScript feature for observation of objects that also was axed.

Follow Us

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.


ARN Innovation Awards 2022

Innovation Awards is the market-leading awards program for celebrating ecosystem innovation and excellence across the technology sector in Australia.

EDGE 2022

EDGE is the leading technology conference for business leaders in Australia and New Zealand, built on the foundations of collaboration, education and advancement.

Show Comments