-
Notifications
You must be signed in to change notification settings - Fork 6
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
Some followups and polish for the tutorial #65
base: main
Are you sure you want to change the base?
Conversation
In this tutorial, we will walk through the process of creating a Web Component that can be used to display Mastodon | ||
posts on any website or application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what this paragraph really adds? Perhaps we can just remove it?
|
||
To make sure that the URL isn't malformed, we pass it through the URL constructor before returning the attribute value. | ||
To make sure that the URL is valid, we pass it through the URL constructor before returning the attribute value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure that the URL is valid, we pass it through the URL constructor before returning the attribute value. | |
To always have a valid URL, pass it through the URL constructor before returning the attribute value. |
And we can persist the value to an attribute using `setAttribute`: | ||
## Fetching the data | ||
|
||
Now we can use the fetch method to make a network request and display the data that we receive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we can use the fetch method to make a network request and display the data that we receive. | |
The fetch method to make a network request and display the data from the response. |
{% tip %} | ||
|
||
To support all modern browser make sure to provide a fallback approach for those browser which does not support the | ||
`CSSStyleSheet` API. | ||
|
||
{% endtip %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something for us to do here is have a reference section on polyfills, which we can link to for items like this.
Here are just some random changes I've done.