W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: [WebIDL] Allowing specifications to opt in to throwing on sets of enumerated attributes to invalid values

From: Marcos Caceres <w3c@marcosc.com>
Date: Thu, 15 Nov 2012 16:03:20 +0000
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <DBBC2B0125464CA3ADBB024775E18A55@marcosc.com>


On Thursday, November 15, 2012 at 3:09 PM, Boris Zbarsky wrote:

> > Worst case, you end up with something like:
> >  
> > try{
> > fooObj.bar = value;
> > //did it really assign the value?
> > if(fooObj.bar === value){
>  
>  
>  
> Why do you need that if check? The whole point of [strict] is that if
> it didn't throw, it assigned the value.

Yeah, I realized that after I sent it… but assume Version 0 works like WebIDL does today. So, a value may or may not be set (as it may fall back to a default), so you need to confirm that it actually worked. If Version 1 switches to [strict], then you need the above check to catch Version 0, no?

--  
Marcos Caceres
Received on Thursday, 15 November 2012 16:03:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:07 UTC