amp-script: Support local scripts via "script" attribute#23043
Merged
dreamofabear merged 8 commits intoampproject:masterfrom Jun 28, 2019
Merged
amp-script: Support local scripts via "script" attribute#23043dreamofabear merged 8 commits intoampproject:masterfrom
dreamofabear merged 8 commits intoampproject:masterfrom
Conversation
Gregable
requested changes
Jun 26, 2019
added 2 commits
June 26, 2019 18:23
kristoferbaxter
approved these changes
Jun 27, 2019
| | </body> | ||
| >> ^~~~~~~~~ | ||
| amp-script/0.1/test/validator-amp-script-not-origin-trial.html:34:6 The tag 'amp-experiment-token' is missing or incorrect, but required by 'amp-script'. (see https://amp.dev/documentation/components/amp-script) [AMP_TAG_PROBLEM] | ||
| amp-script/0.1/test/validator-amp-script-not-origin-trial.html:34:6 The tag 'amp-experiment-token' is missing or incorrect, but required by 'amp-script'. (see https://amp.dev/documentation/components/amp-script) [AMP_TAG_PROBLEM] No newline at end of file |
Contributor
There was a problem hiding this comment.
Intentional change?
Author
There was a problem hiding this comment.
Hmm this was auto-generated by gulp validator --update_tests. I think it's harmless.
| 1. Mutations are always accepted after a user action for a user action interval of 5 seconds. | ||
| 2. The 5 seconds interval is extended if the user script performs a `fetch()` operation. | ||
| 3. Smaller `amp-script` elements with height under `300px` and non-`container` layout are allowed unlimitted mutations. | ||
| 3. Smaller `amp-script` elements with height under `300px` and non-`container` layout are allowed unlimited mutations. |
kristoferbaxter
approved these changes
Jun 27, 2019
Gregable
approved these changes
Jun 28, 2019
Member
|
This affects how https://github.com/ampproject/amppackager#security-considerations are applied. I'm going to send a change to amppkg not to sign pages with inline amp-scripts, unless I hear a compelling alternative. I was hoping to have time to make a less rushed decision re: this. |
Gregable
pushed a commit
that referenced
this pull request
Jul 2, 2019
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.
Fixes #22612.
Open to suggestions for an attribute name other than "script" which is a tad overloaded. Was following convention set by "template" attribute.
Note these are only reference by id rather than inline (children) since I wanted to avoid the hydration filtering issue.