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

API Proposal: Expose Custom Element Manifest from ComponentDefintion / define function #24

Open
JRJurman opened this issue Sep 2, 2023 · 1 comment

Comments

@JRJurman
Copy link
Member

JRJurman commented Sep 2, 2023

Summary

Right now intellisense when using web-components can be lacking. However, there is a standard for custom-element manifests, see https://github.com/webcomponents/custom-elements-manifest

This provides auto-completion and hover-over information, similar to what's already available for native HTML elements. You can see interactive examples of this here: https://github.com/microsoft/vscode-custom-data/tree/main/samples/webcomponents

We should provide an interface, either in the define function, the ComponentDefinition class, or ideally both, that allows users to define the details of, and get an export of their manifest. Ideally developers would be able to make use of the details here at runtime, although the practicality of that is potentially low.

While we should strive to make the single html file the best possible experience, there is a possibility that this would be a huge benefit to library developers.

@JRJurman
Copy link
Member Author

JRJurman commented Nov 9, 2023

The best possible option here might be to generate a file when exporting a component to a JS definition. This should allow developers to share documentation about their own components.

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

1 participant