Skip to content

Updating amp-script documentation, part 1#29487

Merged
rsimha merged 5 commits intoampproject:masterfrom
morsssss:master
Jul 29, 2020
Merged

Updating amp-script documentation, part 1#29487
rsimha merged 5 commits intoampproject:masterfrom
morsssss:master

Conversation

@morsssss
Copy link
Copy Markdown
Contributor

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!

@google-cla google-cla bot added the cla: yes label Jul 24, 2020
@morsssss morsssss marked this pull request as draft July 24, 2020 03:25
@morsssss morsssss marked this pull request as ready for review July 24, 2020 20:56
@CrystalOnScript CrystalOnScript self-requested a review July 24, 2020 21:03
Copy link
Copy Markdown
Contributor

@CrystalOnScript CrystalOnScript left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just a few nits and a suggestion. Thanks for updating!

Copy link
Copy Markdown
Contributor

@rsimha rsimha left a comment

Choose a reason for hiding this comment

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

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.)

@rsimha rsimha merged commit 1c46983 into ampproject:master Jul 29, 2020
Here's you might build the hash in node.js:

```js
function generateCSPHash(script) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please link to the amp-toolbox module instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here's you might build the hash in node.js:

```js
function generateCSPHash(script) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

The raw tag here is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants