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

Some followups and polish for the tutorial #65

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

koddsson
Copy link
Collaborator

Here are just some random changes I've done.

Comment on lines +9 to +10
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.
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines +75 to +80
{% tip %}

To support all modern browser make sure to provide a fallback approach for those browser which does not support the
`CSSStyleSheet` API.

{% endtip %}
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

2 participants