Repo, issue-term, theme Are Not Script Attributes
See original GitHub issueI see w3c validation warnings on my page, when I use the following HTML
<script src="https://utteranc.es/client.js"
repo="utterance/utterances"
issue-term="homepage"
crossorigin="anonymous"
theme="github-light"
async>
</script>
repo, issue, and theme are not standard attributes of the script tag. The checker will not throw a warning if data-
is prepended to the attribute. Maybe, it would be better to make the API a function call class method, but still maintain backwards compatibility.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
[feature request] make dark/light mode change with ...
so my website has a light and dark theme. would there be a way to do what the ... repo="$REPO" issue-term="pathname" theme="github-dark" ...
Read more >How to use Utterances with React - Paul Scanlon
This object is used to hold key value pairs for the attributes that will be added to the newly created HTML script element....
Read more >Adding comments to your Gatsby blog with Utterances
A simple React component for comments and how to dynamically change its theme.
Read more >Add script tag to ReactJS [duplicate] - gatsby
I'm trying to add a comment script to my blog running on Gatsby. ... repo="[ENTER REPO HERE]" issue-term="pathname" theme="github-light" ...
Read more >Add comments to your blog using GitHub Issues - abba.dev
... this in a non-react app <script src="https://utteranc.es/client.js" repo="[ENTER REPO HERE]" issue-term="pathname" label="comment" theme="github-light" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@geoffviola utterances now supports
data-
prefixed attributes. Thanks for opening this issue 👍I used official W3C validator.
This is the code I tried
And it fails.
It points to this doc https://html.spec.whatwg.org/multipage/scripting.html#the-script-element
Also please have a look this part of the doc
https://html.spec.whatwg.org/#embedding-custom-non-visible-data-with-the-data-*-attributes
My understanding is that store data or state
data-
is required.