Don’t call me DOM

30 July 2009

WebIDL checker

Filed under:

A growing number of W3C groups are in the process of developing JavaScript APIs: the HTML Working Group, the Web Applications Working Group, the SVG Working Group, the Geolocation Working Group, and the newly created Device APIs and Policy Working Group of which I am one of the Staff Contacts.

The Web Applications Working Group has been developing a common IDL format to define these APIs, called WebIDL, which basically takes the OMG IDL format and extend it to make it more useful and informative in the context of JavaScript APIs.

In the context of the development of the OMTP BONDI APIs that will serve as input to the new Device APIs and Policy Working Group, an OMTP Member, Aplix, developed and released under an open-source license a tool called widlproc that checks the validity of WebIDL interfaces, and turns valid fragments into an XML format.

I already have plenty of ideas on how to exploit that XML serialization of WebIDLs, but as a first step into the world of WebIDLs, I have developed and set up on-line WebIDL checker that provides a wrapper around widlproc. You feed it with the address of an HTML document containing WebIDLs and it:

  • automatically extracts WebIDLs fragments from an HTML document (using XPath),
  • verifies the validity of these fragments (through widlproc),
  • outputs error messages when finding invalid fragments,
  • outputs an HTML representation of the APIs otherwise (by applying an XSLT style sheet to wildproc output).

Some examples of results:

It is clearly a niche-tool – how many people on earth are ever going to write a WebIDL ? But hopefully it will help in detecting bugs in WebIDLs produced by W3C groups and others.

4 Responses to “WebIDL checker”

  1. Dominique Hazaël-Massieux (dontcallmedom) 's status on Thursday, 30-Jul-09 07:31:01 UTC - Says:

    [...] released a WebIDL checker (thanks to @kaihendry for making widlproc [...]

  2. David Bruant Says:

    The link is broken. Has the format moved to somewhere else ?

  3. David Bruant Says:

    My previous comment is erroneous. The “OMG IDL format” link is broken.

  4. fabio Says:

    hi, do you know any tools to general from WebIDL and/or xml produced by widlproc javascript stubs of that APIs ? thanks

Picture of Dominique Hazael-MassieuxDominique Hazaël-Massieux ( is part of the World Wide Web Consortium (W3C) Staff; his interests cover a number of Web technologies, as well as the usage of open source software in a distributed work environment.