-
Notifications
You must be signed in to change notification settings - Fork 20
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
Create framework for generating full classes from impl + .idl #32
Comments
One thing of interest here is that we should probably just standardize |
But (I guess it could be made semi-generic if it said something like "let string be Invoke(this, |
Well, we could make IDL extensible. Also, the whole idea of layering does not quite apply as IDL requires some stuff from HTML already, such as settings objects. |
I like that idea. Specs could define their own IDL thingies when they use them enough. I will send a public-script-coord email to help us figure out our near-term plan. |
This project is https://github.com/domenic/webidl-class-generator |
Spawned from #31:
Given
plus the text
in the spec, we would commit an IDL file containing
Then we'd write the following ES6:
Things to note:
extends Bar
and anything related tox
since they are determined entirely by the IDLWhat will then happen is that we do something like
and
registerImpl
generates a wrapper classFoo
that delegates toFooImpl
and does all the other stuff determined by the IDL. If we were to write it out, it would look likeI am unsure whether we should generate the wrapper class at runtime or at compile time. Runtime seems easier off the top of my head, but that is partially because I do not have as much experience with parsers/generators as I would like.
Steps:
:
; generateextends
I will probably do this work in a separate repo. Will link as it happens.
The text was updated successfully, but these errors were encountered: