-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add a meta tag to indicate custom elements manifest location on webpage #71
Comments
I'm not quite following the use case here. Is the idea that the devtools extension will know how to enhance the docs pages somehow? It seems like it'd be better to include whatever functionality is needed right in the page so that viewers don't have to install an extension or open devtools. We can build really nice documentation components to cover these cases, yeah? What kind of enhancements are we talking about? |
The devtools case maybe wasn't the best example here. But the use case that raised this need was that you would be able to inspect and fiddle with elements in a storybook/custom similiar environment (shoelace.style in this case). But thinking about this more, I think it'd be beneficial to allow sites without a package.json or other configuration to allow tooling to discover their custom-elements-manifest more reliably. As the adopting of the CEM grows, more tooling could utilize the meta tag to reliably find the manifest, instead of the developers having to declare it explicitly to every tool. Cases that come to mind would be a cataloging crawler, something like the custom elements locator. As those tools might not have access to any other reliable source to confirm the location of a custom-elements.json, They'd have to either guess the location, or fetch it from the meta tag. |
Nudging this. shoelace.style has already adopted this pattern and it is a fairly small thing for the developer to do to add support for more easily discoverable CEM's that I don't see a downside on adding this to the README. The PR here #70 also has a few of the web component people thumb upping it, so I'm guessing this is a feature that would be wanted |
If metadata as described here is needed, wouldn't a https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element:
https://html.spec.whatwg.org/multipage/semantics.html#other-metadata-names:
|
I'm still very confused by the use case here. Where are the manifests going to be stored? Is there a canonical location like unpkg.com? Or should libraries host their manifests somewhere? Should the be versioned? How are the Then, what's the use case for a public page to have its manifest(s) published? Is there any precedent with JS libraries, like a |
Documented here: #70
As in some situations, the tooling might not have access to a package.json, it would be beneficial to be able to indicate the location of the custom elements manifest in the html page. A meta tag should be enough for this.
This came up in a discussion with @claviska (https://github.com/claviska), when discussing CEM and DevTools support with the shoelace documentation site.
This would allow documentation sites to indicate the location of the CEM through a meta tag, allowing the devtools to find the manifest for an enhanced experience on the docs page.
The text was updated successfully, but these errors were encountered: