-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Bento docs: split Example and Import via script sections #36992
Bento docs: split Example and Import via script sections #36992
Conversation
Hey @westonruter, @ediamin! These files were changed:
|
<script type="nomodule" src="https://cdn.ampproject.org/bento.js"></script> | ||
<script type="module" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.mjs"></script> | ||
<script type="nomodule" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.js"></script> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.ampproject.org/v0/bento-accordion-1.0.css"/> |
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.
Any reason for using self-closing tag for link
elements?
<link rel="stylesheet" type="text/css" href="https://cdn.ampproject.org/v0/bento-accordion-1.0.css"/> | |
<link rel="stylesheet" type="text/css" href="https://cdn.ampproject.org/v0/bento-accordion-1.0.css"> |
It's only relevant for XHTML which is largely from a bygone era.
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.
No idea where that came from...removed.
<script type="module" src="https://cdn.ampproject.org/bento.mjs"></script> | ||
<script type="nomodule" src="https://cdn.ampproject.org/bento.js"></script> | ||
<script type="module" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.mjs"></script> | ||
<script type="nomodule" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.js"></script> |
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.
There's an extra space here (and in the other changed files):
<script type="nomodule" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.js"></script> | |
<script type="nomodule" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.js"></script> |
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.
Also, nomodule
should be an attribute not a type, right?
<script type="nomodule" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.js"></script> | |
<script type="text/javascript" nomodule src="https://cdn.ampproject.org/v0/bento-accordion-1.0.js"></script> |
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.
Fixed the space. nomodule is an attribute.
|
||
```html | ||
<script type="module" src="https://cdn.ampproject.org/bento.mjs"></script> | ||
<script type="nomodule" src="https://cdn.ampproject.org/bento.js"></script> |
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.
<script type="nomodule" src="https://cdn.ampproject.org/bento.js"></script> | |
<script type="text/javascript" nomodule src="https://cdn.ampproject.org/bento.js"></script> |
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.
Is this really needed?
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.
("text/javascript")
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.
No idea where that came from! 😉
You're right, remove it. It's not needed.
5f87c83
to
ae4cabd
Compare
@westonruter thanks for the review! |
Also, what about adding |
ae4cabd
to
de27d4b
Compare
Good call! Completely forgot about this. Added |
We need to update all code snippets to follow this pattern. |
No description provided.