Re: WebIDL generated TypeErrors and promises

On Friday, June 28, 2013 at 3:47 PM, Domenic Denicola wrote:

> I don't think this has been discussed, but it's a good thing to bring up.
>  
> I feel somewhat strongly that functions should present an only-sync or only-async interface. Thus I would say `boo` gets called with the `TypeError`.
>  


Ok, but this potentially breaks WebIDL… maybe kinda… I think most specs assume that WebIDL does its thing, then algorithmic prose runs.  

This would mean that specs that use promises need to be written as:

[[
When the foo(V) method is invoked:  

1. do type conversion on V as per WebIDL, and let error be any exception thrown. If an exception is thrown, run the promise's resolver's internal reject algorithm with error as value.

]]

Or some such. 

Received on Friday, 28 June 2013 15:01:58 UTC