W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2013

Re: Promises: final steps

From: Kris Kowal <kris.kowal@cixar.com>
Date: Wed, 4 Sep 2013 12:15:14 -0700
Message-ID: <CAKySqA8smyNGKrk-NVtsP9kVw3tYw64yME58SBsj5-7zNNPF9g@mail.gmail.com>
To: Kevin Smith <zenparsing@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, "www-dom@w3.org" <www-dom@w3.org>, es-discuss <es-discuss@mozilla.org>
My colleagues and I are working on an extension for Chrome Web Inspector
that can communicate with promise libraries, particularly Q, over the
window message port. The tool, which will be renamed and rewritten before
it is ready for general use, adds a Promises tab to Web Inspector that
shows all currently pending and unhandled asynchronous errors, as well as
stack traces for both, and also progress information, albeit determinate,
indeterminate, or indeterminate but lively. There is a video accompanying
for demonstration.



The promise client broadcasts when a promise is deferred, when a deferred
promise is resolved, when a deferred promise makes progress (through the
`deferred.notify` interface), when a fulfilled promise is created, when a
rejected promise is created, and when a rejection is handled. As such, the
inspector can reconstruct whatever portion of the program’s promise history
it elects to retain.

In time, I intend to formalize a protocol. Ideally this system would be
useful for both “primordial” and library promises, and combinations of
both. Of course, any assistance would be valuable.

Also, ideally this would approach the functionality available to Causeway
and perhaps even *become* a manifestation of Causeway.


It would certainly be possible to show promises in multiple contexts,
including cross-origin iframes, and even show time sequence / Stevens
graphs for message passing between promises in multiple JavaScript
contexts, when promises are used as proxies for remote objects through a
facility like Q-Connection


Kris Kowal
Received on Wednesday, 4 September 2013 19:22:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:03 UTC