-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
web-sys public interface #807
Comments
This seems like a good idea to me! I think we could pretty reasonably basically have a public crate that sits on top of web-sys's webidls and is run by web-sys's build script. That could have a conservative API which provides access to all of the internals of what we do, basically iterating over the program imports that we generate |
I'm going to close this since it's been quiet for some time, it's still possible to add this if necessary though! |
@alexandrestein I've just landed here from rust-lang/rls#1489. It seems like this would be required to have a good RLS experience with web-sys |
@Pauan In my case I have the last version of wasm-bindgen(0.2.59) and web_sys(0.3.36) and I don't get autocomplete in vscode |
I would like the ability to figure out the relationship from webidl files and investigate the properties, and interfaces an element exposes.
The use-case I am trying to solve is essentially wrapping up the interfaces and neaten the API a little. That way I can wrap that "input" creates
HTMLInputElement
and also implementsHTMLElement
I started by parsing webidl myself however it will end up requiring a lot of reimplementation of the web-sys crate. I ended up having to manipulate
type
into_type
,accessKey
toaccess_key
andHTMLDivElement
toHtmlDivElement
I'm not sure if it makes sense to output the backend format instead, in a way I kind of need a mapping of the webidl to the web_sys.
To be useful I would need something like an interim data structure like the following:
Having the ast that is about to be written to file might be a simpler way to code generate and wrap around the Element interfaces.
The text was updated successfully, but these errors were encountered: