Re: ISSUE-44: XHR: Overloading in the IDL

Web APIs Issue Tracker wrote:
> ISSUE-44: XHR: Overloading in the IDL
> 
> http://www.w3.org/2005/06/tracker/webapi/issues/44
> 
> Raised by: Bjoern Hoehrmann
> On product: XMLHttpRequest
> 
> The current draft does not say which "IDL" is used to define the XHR
> interface, but as far as I can tell overloading is not allowed in OMG
> IDL. We need to either explain this in the document or change the IDL
> such that the conflicts are removed. The later can be achieved with
> 
>   void open(... all arguments here ...);
>   void send(in DOMObject data) ...;
> 
> Where the implications are explained in the member definitions and
> the language bindings as appropriate, so this is a change in form
> only. .setParameter in Core does something similar to what I propose
> for send(), optional parameters are new in the DOM-like W3C APIs. In
> addition, there should be clear reference to the IDL specification.

Yes, that sounds like the right solution to me.

> Shouldn't send() raise an exception if the method does not support
> the type of data passed to it, btw?

It probably should. Though in ECMAScript and Java there should be no 
such objects. If the object isn't a Document we simply call .toString on it.

/ Jonas

Received on Monday, 20 March 2006 00:29:57 UTC