Reputation: 6211
I'm looking for a machine-readable reference of JavaScript classes (members, methods, parameters...), especially related to the HTML5 standard (canvas, storage, etc.).
All I have found so far is the specs on the W3C site, which include a part of the specification, f.i. http://dev.w3.org/html5/2dcontext/ has in it the Web IDL for CanvasRenderingContext2D, and other pages have other portions.
But I must be blind as I couldn't find some global index/summary with all the valid IDLs sorted and classified by version/drafts/etc.
Anyone know where it can be found?
Upvotes: 16
Views: 1495
Reputation: 13729
See below link:
Dependent Specifications: http://www.w3.org/wiki/Web_IDL#Dependent_Specifications
Upvotes: 0
Reputation: 34391
The WebIDLs used by Mozilla can be found at http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
Upvotes: 0
Reputation: 6211
Asked Ian Hickson (editor of the spec at the time of this answer), here is an edited summary of his reply:
There is not a single document that contains all the IDL fragments, no.
[so the HTML spec documents constitute the reference for WebIDL]
FWIW, I recommend using this source:
It's more canonical than the W3C copies.
A blind extraction [of the <pre class="idl"> elements] should mostly work. It'll need a little massaging, but not much. Make sure to exclude the class="idl extract" blocks.
I actually do do a blind extraction as part of the spec generation process, to verify that the IDL syntax is correct (or rather, that all the mistakes are intentional... I occasionally use syntax that isn't specced in the WebIDL spec yet).
Upvotes: 3
Reputation: 82976
HTML5 is still changing, so any official reference bar the spec is almost inevitably going to be out of date.
Your best bet is to suck the data straight out of the spec. Parse the file and then extract all the pre
elements with class idl
. That's your machine readable list. Guaranteed official and up-to-date.
Upvotes: 3
Reputation: 42200
Not sure if it is WebIDL, but the WebKit Source has lots .idl
files mixed in with the .cpp
and .h
files. You can browse the source online. Start at WebCore and dig into some of the subdirectories.
Upvotes: 1