- From: Cameron McCormack <cam@mcc.id.au>
- Date: Fri, 29 Jun 2007 10:23:41 +1000
- To: public-webapi@w3.org
Replying to some comments from Anne in IRC: anne: > heycam, [Constructor] also needs to address things with arguments OK. Apart from the Audio/Image/Option constructors mentioned in HTML 5, do you know of any other objects that have constructors that take arguments? > heycam, and actually also things that create objects of different > names... > new Image(a, b) -> HTMLImageElement I feel like these constructors are a bit weird and specific to HTML. I would be happy to have them left as some extra description in HTML 5 rather than sticking them in some IDL. If there are other language bindings used for HTML 5, then they still have document.createElement() to handle these. Alternatively, a hack would be to have interface Audio { [Constructor] Audio createAudio(); [Constructor, Overloads=createAudio] Audio createAudioWithSrc(in DOMString src); } where the newly created HTMLAudioElement object would also happen to implement the Audio interface. > also something about Image(a, b) throwing Nothing’s mentioned in HTML 5 at the moment about that constructor throwing. > heycam, would be nice to be able to say ByteArray in bindings I think typedef sequence<octet> ByteArray; plus loosening of the type mapping for sequences as mentioned in http://www.w3.org/mid/20070628112526.GA14240@arc.mcc.id.au would be sufficient for this. > heycam, I think DOMStringNull also makes some sense versus a special > [[Null]] Yeah, it does to me, too. But how much do we want to describe currently published IDL, versus fixing some of the oddities like this? -- Cameron McCormack, http://mcc.id.au/ xmpp:heycam@jabber.org ▪ ICQ 26955922 ▪ MSN cam@mcc.id.au
Received on Friday, 29 June 2007 00:23:51 UTC