Re: Push API - use parameterized Promise types

On 3/20/14 11:46 AM, Michael van Ouwerkerk wrote:
> So it is not normative? It seems it would be very informative though, so
> still worth adding to the spec. But it seems it would be even better if
> it was changed to be normative.

It's normative in the sense that the implementation of the method needs 
to return that value.

But the method call processing model in WebIDL itself doesn't enforce 
that, per se.  It assumes that specs that in their IDL say they return a 
Foo cannot in fact return anything other than a Foo and that therefore a 
Foo is what will be returned and needs to be converted from JS.  If 
WebIDL did _not_ assume that, it would presumably need some verbiage 
like "if the returned value is not a Foo, throw a TypeError"... but is 
that useful?

-Boris

Received on Thursday, 20 March 2014 18:14:56 UTC