Re: [WebIDL] overloading string/null/object

Anne van Kesteren:
> If I have
>
>   x(in DOMString y);
>   x(in Document y);
>
> do I need to put [Null=Null, Undefined=Null] in front of "in DOMString" 
> or will this work correctly automatically?

I still need to fix up the text for [[Put]] on host objects to make that
exactly clear, but I imagine that you would put:

  x([Undefined=Null] in DOMString y);
  x(in Document y);

That way, passing null would result in the second ‘x’ being called, and
passing undefined would call the first ‘x’.

(I must check what happens when undefined is passed to functions
expecting an object, at some point.  And fix up the overloading
ambiguity stuff.)

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Friday, 23 May 2008 05:43:00 UTC