-
Notifications
You must be signed in to change notification settings - Fork 11
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 baseline-status
code snippet for each feature
#31
Comments
Is there any updates on this? If not is there any guidelines on how to gather this information from available data? |
The For instance, If you're on https://web-platform-dx.github.io/web-features-explorer/features/anchor-positioning/ and want to use the component to show "Anchor Positioning" status, you would use the last part of the URL, and add this to your site-
|
In currently use the baseline-status component but have a hard time identifying the ID for the feature to use
The problem is that there is no way to figure out the ID for a feature to use with the baseline component. For example, what would the feature ID be for addEventListener, CustomEvents, the Event and CustomEvent constructors? If I look at MDN, the feature appears as widely available and I havent' been able to figure out what's the ID to use |
You're looking for
Neither the explorer or MDN directly have a great way of surfacing this, but doing a search of the web-features/features directory should surface where those terms can be found. |
That didn't work. I copied the example you provided into a page on my post and it still reports unknown compatibility. I tried to pull data from web-features/features but the IDs don't match |
Can you say more about what you tried here, and what didn't match? Here's an example of the component with the |
Events now work as intended. All the other features I wanted to use report unknown availability. I forked your Codepen from your previous comment and used to add the other features that I wanted to use |
That's because the web-features repository does not list all of the individual features of the web. For example, The way we define features on the repo is by making them match how most developers think about them. As a web developer, you want to know if events are supported as a whole. MDN does show a baseline widget per reference page. That's why you see one on the I think this raises a very valid question of whether the |
Thank you :) |
Related to #15, it would be useful to have a copyable code snippet on each feature page so people could easily use the
baseline-status
component for a feature.We would also need to make it clear on how to install/load the component.
The text was updated successfully, but these errors were encountered: