Paul Krill
Editor at Large

Cancelable JavaScript promises cancelled

news
Dec 22, 20162 mins

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

cancelled stamp
Credit: Alachua County

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author