- From: <bugzilla@jessica.w3.org>
- Date: Fri, 14 Mar 2014 02:37:18 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25048
--- Comment #6 from Cameron McCormack <cam@mcc.id.au> ---
(In reply to Domenic Denicola from comment #5)
> > Hmm, what if you had an IDL attribute of a Promise<T> type that throws when assigning?
>
> Yeah, this is trickier to reason about---mainly because I don't know of a
> reasonable use case for promise attributes with setters. I assume there'd be
> coercion behavior, so e.g. for a Promise<long> attribute these would be fine:
>
> foo.bar = 5;
> foo.bar = Promise.resolve(5);
>
> but these would not:
>
> foo.bar = {};
> foo.bar = Promise.resolve(function () { });
>
> I would probably again argue that the result should be `foo.bar` set to a
> promise rejected with a `TypeError`, since people would access the result of
> the set via
>
> foo.bar.then(processValueRepresentedByBar, couldNotGetValue);
That's my initial feeling too.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 14 March 2014 02:37:19 UTC