Updating amp-script documentation, part 1#29487
Merged
rsimha merged 5 commits intoampproject:masterfrom Jul 29, 2020
Merged
Conversation
CrystalOnScript
approved these changes
Jul 24, 2020
Contributor
CrystalOnScript
left a comment
There was a problem hiding this comment.
Overall LGTM, just a few nits and a suggestion. Thanks for updating!
rsimha
approved these changes
Jul 29, 2020
Contributor
There was a problem hiding this comment.
Owners approval. (Required because @CrystalOnScript and @morsssss are both owners of .md files by virtue of being members of @ampproject/wg-outreach, but neither of them are members of @ampproject/reviewers-amphtml.)
| Here's you might build the hash in node.js: | ||
|
|
||
| ```js | ||
| function generateCSPHash(script) { |
Contributor
There was a problem hiding this comment.
Please link to the amp-toolbox module instead.
Contributor
There was a problem hiding this comment.
| Here's you might build the hash in node.js: | ||
|
|
||
| ```js | ||
| function generateCSPHash(script) { |
Contributor
There was a problem hiding this comment.
| #### Creating AMP elements | ||
|
|
||
| With regard to dynamic creation of AMP elements (e.g. via `document.createElement()`), only `amp-img` and `amp-layout` are currently allowed. Please upvote or comment on [#25344](https://github.com/ampproject/amphtml/issues/25344) with your use case. | ||
| With regard to dynamic creation of AMP elements (e.g. via `document.createElement()`), only `amp-img` and `amp-layout` are currently allowed. Please upvote or comment on {{'[% raw %]'}}[#{{'{% endraw %}'}}25344](https://github.com/ampproject/amphtml/issues/25344) with your use case. |
Contributor
There was a problem hiding this comment.
The raw tag here is broken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm updating the documentation for amp-script. This is the first part of that effort!
@CrystalOnScript , I've never done this sort of overhaul before. This is just the beginning. As I go, I'll work to pull the formatting closer to your new standard. Let me know though if I'm doing this right!