- From: Andrew Oakley <andrew@ado.is-a-geek.net>
- Date: Mon, 05 Jul 2010 15:43:55 +0100
- To: public-webapps@w3.org
Is there any agreement on how exceptions in WebIDL should map to ECMAScript objects? I can't see anything in WebIDL to specify this. I would have expected each exception type to have an interface object and an interface prototype object, both containing the constants for the exception numbers. The interface prototype objects would all inherit from the same thing (I used DOMException but ACID3 implies this is incorrect). This object would then implement toString for exceptions. Inheriting from the ECMAScript Error.prototype object would also seem reasonable. My understanding of the current browser implementation is that in Gecko and Webkit browsers the interface prototype objects have Object.prototype as their [[Prototype]]. Opera doesn't seem to have interface prototype objects for exceptions. I would propose that the right thing to say in WebIDL is that exception interface and interface prototype objects are constructed in the same manner as normal interfaces, and that the interface prototype objects have the Object.prototype object as their [[Prototype]] unless something else is indicated in the IDL. Does this seem right, or am I barking up the wrong tree? -- Andrew Oakley
Received on Monday, 5 July 2010 14:39:08 UTC