W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2010

IDL constants outside interfaces (widlproc, WebIDL, and DOM Level 3 events)

From: Philippe Le Hegaret <plh@w3.org>
Date: Wed, 31 Mar 2010 10:32:27 -0400
To: WWW DOM <www-dom@w3.org>
Message-Id: <1270045947.4350.6.camel@chacal>
widlproc [1] doesn't like the fact that two constants are defined
outside an interface in the DOM Level 3 Events specification:
[[
// Introduced in DOM Level 2:
exception EventException {
  unsigned short          code;
};

// EventExceptionCode
const unsigned short      UNSPECIFIED_EVENT_TYPE_ERR     = 0;
// Introduced in DOM Level 3:
const unsigned short      DISPATCH_REQUEST_ERR           = 1;
]]

It doesn't look like WebIDL alows this [2]. Should the spec be modify to
match the definition of WebIDL or should WebIDL be modified to allow
constants outside an interface?

Philippe

[1] http://widl.webvm.net/svn/widlproc/trunk/
[2] http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-Events-EventException
[3] http://www.w3.org/TR/WebIDL/ 
Received on Wednesday, 31 March 2010 14:32:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT