Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to regenerate w3c idl files ? #14

Closed
jeromeetienne opened this issue May 12, 2014 · 2 comments
Closed

how to regenerate w3c idl files ? #14

jeromeetienne opened this issue May 12, 2014 · 2 comments

Comments

@jeromeetienne
Copy link

(it isnt directly related but webidl2.js but as you are quite involved with w3c, i guessed i could ask :) )

i would like to regenerate w3c idl files and parse them with webidl2.js. im searching the web and can't find the doc. maybe you got answers or simply pointers. both would be welcomed

question: where to find w3c idls ?

question how to preprocess them to get actual idl ?

  • they contains cpp preprocessor directive apparently
  • how to preprocess them to get actual pure idl ?
@darobin
Copy link
Member

darobin commented May 12, 2014

There is no centrally collected set of W3C IDLs. The DOM Level 2 ones you point to are very out of date (also: they are OMG IDL, not WebIDL, and as you note they rely preprocessing), I recommend against using them.

You can get a list of all specs at w3.org/TR/. I guess those listed under the "Javascript APIs" category are the ones of interest. You can search for .idl:not(.extract) to normally get all WebIDL sections; extracting their text should give you all you need.

We have plans to produce this in a more automated and easy to grab way, but at this point that hasn't been done.

@darobin darobin closed this as completed May 12, 2014
@jeromeetienne
Copy link
Author

Thanks!

For future reference, here is the code i used in the page

for(var i = 0, arr = document.querySelectorAll('.idl:not(.extract)');i < arr.length; i++){
      console.log(arr[i].innerText);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants