-
Notifications
You must be signed in to change notification settings - Fork 113
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
Events API #51
Comments
What kind of events? |
@aeschli sorry for my lack of clarity. I mean for events fired by the elements, particularly custom elements |
Please give some examples... Maybe a small sample code what you expect to see (hovers, code completion...) |
I think that @event is a great example for how it could be denoted. The hover for jsdoc is really good. I think the hover could either:
|
I guess this is about JavaScript/TypeScript then. Still I don't know what exactly you suggest to improve or add. Something for VSCode to show, or a TypeScript language feature? |
Similar to this issue WICG/webcomponents#776 that addresses displaying details about custom components, I would add to it to show events when writing HTML |
If all you want is |
@octref because the type of input is always function, but what's important about documenting events is not the type of input but the type of data from the event |
We don't do any type-checking diagnostic for HTML attribute value, at least not on the HTML service. What Language Feature exactly do you want for events? |
ping @goatandsheep |
@aeschli I was thinking about how when you do event handling in the HTML, your input for an It's fine if referring to events in the hovers doesn't require code changes, but we should encourage use and show examples of how it would be used. |
Due to the myriad ways people load their JS it's impossible to check where the value of |
@octref would this standard for documenting custom elements using jsdocs by @runem still require a myriad of ways to diagnose the values? |
You should ask them to generate data of this format: https://github.com/microsoft/vscode-html-languageservice/blob/master/docs/customData.md. |
@octref thank you for the suggestion! They actually already do generate data of that format, but the format is quite rudimentary as it doesn't let you list events, slots, nor cssprops. I'm thinking, instead of trying to interpret each of the jsdoc tags and every future request that may come, is there a way to just show various tags as hover comments? |
No. Each item's |
That's perfect. Thanks @octref ! |
Is there a way to show events fired?
The text was updated successfully, but these errors were encountered: