Re: [promise] writing detailed spec of ProgressPromise & implementing it

Takeshi Yoshino <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <CAH9hSJaEoCmu3gpCc-JD0bM4BFV5_3DnrJ0YYKV3UEEk0K9dOQ@mail.gmail.com>
On Thu, Aug 8, 2013 at 10:11 PM, Anne van Kesteren <[email protected]> wrote:

> On Thu, Aug 8, 2013 at 9:15 AM, Yusuke Suzuki <[email protected]>
> wrote:
> > We're planning to make ProgressPromise spec more detailed and implement
> it
> > on Blink experimentally.
> > ProgressPromise is planed to be used for some APIs, such as
> XMLHttpRequest /
> > FileAPI.
> >
> > Please feel free to comment about this.
>
> Mozilla has similar plans. Mostly for an <input type=file>-based
> directory picker:
> http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Aug/0019.html
>

Thanks for heads up.


> I'm planning on drafting something in http://dom.spec.whatwg.org/
> based on
> https://github.com/slightlyoff/Promises/blob/master/ProgressFuture.idl


Great! We were wondering if anyone is working on or not.


> interface ProgressPromiseResolver : PromiseResolver {
>   void progress(optional any progressValue);
> };
>
> callback ProgressPromiseInit = void (ProgressPromiseResolver
> resolver); // maybe reuse PromiseInit
>
> [Constructor(ProgressPromiseInit init)]
> interface ProgressPromise : Promise {
>   // Returns the context object
>   ProgressPromise progress(optional AnyCallback progressHandler);
> };
>
> The then()/catch() methods on all Promise objects would still return
> an instance of Promise (not any subclass). Progress values would not
> forward.
>
> Does that match what you have in mind?
>

Yusuke has some thoughts and considerations. He'll follow up later.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.