Re: [WebIDL] Make [AllowAny] the default?

On Fri, 09 Dec 2011 01:19:55 +0100, Cameron McCormack <cam@mcc.id.au>  
wrote:
> I agree that with "Node or DOMString" you're much more likely to get a  
> useful result from converting the JS value to a string rather than a  
> Node.  Is that going to be the common case to warrant choosing DOMString  
> over the Node?  What about other types like "Node or float" or "Node or  
> DOMString or float"?
>
> Or should we make order within the union type matter here too?

Not sure what is going to happen. Do we actually have float or DOMString  
somewhere? Most scenarios I can think of are one or more host objects (is  
that the right term?) versus one ECMAScript type. So if there is always  
only one number, string, or boolean, you can always do the appropriate  
toBoolean(), toNumber(), and toString(). Am I missing something?


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Friday, 9 December 2011 14:08:04 UTC