W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Sun, 19 Mar 2006 16:16:01 -0800
Message-ID: <441DF441.8000708@sicking.cc>
To: Web APIs WG <public-webapi@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:54 GMT