W3C home > Mailing lists > Public > public-webapi@w3.org > December 2007

[Bindings] comments

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 22 Dec 2007 00:52:51 +0100
To: "Web API WG (public)" <public-webapi@w3.org>
Message-ID: <op.t3plyd0m64w2qv@annevk-t60.oslo.opera.com>

I think we should rename this specification to "Web IDL" as it defines an  
IDL language to be used by Web APIs. It also defines a mapping to language  
bindings, but that aspect is less interesting.

http://www.w3.org/TR/2007/WD-DOM-Bindings-20071017/#Overloads is really  
inconvenient from a specification editor perspective. I would like the IDL  
syntax to look a lot more like the IDL syntax in the XMLHttpRequest  
specification. That the four "different" open() methods map to different  
methods in languages that do not support overloading is ok, but ideally  
the IDL stays simple. For my part the names for other languages are  
auto-generated. open_1, open_2, etc. If that is really unacceptable I'd  
like to know how much additional text is needed in the XMLHttpRequest  
specification to cover for those three additional methods. If there's  
indeed need for additional text besides rewriting that part of the IDL it  
seems like this is not the optimal solution as in the end we want to write  

And send() / drawImage() type of overloading is necessary, but that seems  
to be mentioned already, albeit with some open issues which I'm not sure  
how to resolve. Maybe by giving languages that don't do it separate  

It would be really good if we had a way to say that a particular interface  
is exposed on the global object in ECMAScript. For instance, it makes  
sense to have window.XMLHttpRequest, but window.DocumentSelector is not  
necessary given that you already have window.Document.

For constructors, I was wondering whether it's desirable to be able to  
express the Image() constructor on HTMLImageElement or not. (If so, you'd  
need a way to name a constructor.) The way HTML 5 solves that problem  
currently seems pretty simple too. In addition constructors probably need  
to be able to deal with overloading as well.

Anne van Kesteren
Received on Friday, 21 December 2007 23:51:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:24 UTC