Anyone game to try creating a tool that takes as input the WebIDL for an API interface and outputs a skeleton JSON file for adding it to BCD?
There are a few WebIDL parsers available on npm that would provide almost everything that’s needed. Since all you need are the names of attributes and methods, and no other information, you can spit out the framework quite easily.
For each item, simply use null as the value for the support version, indicating “unknown”. Then we can use the tool to generate the structure of the JSON and all we have to do is go in and fill in the details.
Anywhere, really. Just create a project on Github for it for now. If it comes along well, we can always consider migrating it elsewhere. I don’t generally c are what language it’s done in – except that NodeJS means it’s portable and compatible, and because it’s JavaScript, working with JSON is a lot easier than it might be otherwise.
Yes, that’s correct.
Obviously you can look at any of the files in the browser-compat-data repo, but there’s also some documentation there as well as on MDN itself:
So, as a general rule what we’ll actually do is pull the WebIDL from the specifications, since that’s the “official” source, then update it based on the deviations in the browsers. There are Node modules available that are able to locate and extract WebIDL from specifications.