-
Couldn't load subscription status.
- Fork 374
Description
I know that Tern ships with a type definition file "browser.json", which mostly covers the DOM, it would be nice to have definitions for other major APIs like Web Animations, Web Audio, HTML5 Canvas, etc, for auto completion and type information.
I think it should not be too difficult to generate type definition files directly from Web IDL[1] as used in the API standard documents by major browsers[2][3]. The Mozilla project collects them all in a convenient place[4].
There are many Web IDL parsers out there, some of them written in JavaScript, such as this one[5]. I think it should not be too hard to transform the generated AST to Tern's type definition format.
Any ideas, suggestions?
--Alain
[1]: Web IDL - Wikipedia, the free encyclopedia : http://en.wikipedia.org/wiki/Web_IDL
[2]: Web IDL in Blink - The Chromium Projects : http://www.chromium.org/blink/webidl
[3]: WebIDL bindings - Mozilla | MDN : https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings
[4]: mozilla-central mozilla/dom/webidl/ : http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
[5]: darobin/webidl2.js : https://github.com/darobin/webidl2.js