Update amp-form docs to match validators and runtime updates.#5671
Merged
mkhatib merged 3 commits intoampproject:masterfrom Oct 19, 2016
Merged
Update amp-form docs to match validators and runtime updates.#5671mkhatib merged 3 commits intoampproject:masterfrom
mkhatib merged 3 commits intoampproject:masterfrom
Conversation
cramforce
requested changes
Oct 18, 2016
| __required__ when `method=POST` | ||
| __optional__ when `method=GET` | ||
|
|
||
| You can also provide an action-xhr attribute, if provided, the form will be submitted in an XHR fashion. |
Member
There was a problem hiding this comment.
We should at least once explain what an XHR request is
| this.setState_(FormState_.SUBMITTING); | ||
| } else if (this.method_ == 'POST') { | ||
| e.preventDefault(); | ||
| user().assert(false, |
Member
There was a problem hiding this comment.
Please add a test that throws this exception
Contributor
Author
|
PTAL 👀 |
cramforce
approved these changes
Oct 19, 2016
extensions/amp-form/amp-form.md
Outdated
| You can also provide an action-xhr attribute, if provided, the form will be submitted in an XHR fashion. | ||
|
|
||
| This attribute can be the same or a different endpoint than `action` and has the same action requirements above. | ||
| An XHR request, is where the browser would make the request without a full load of the page or opening a new page. Browsers will send the request in the background using [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) when available and fallback to [XMLHttpRequest API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) for older browsers. |
Member
There was a problem hiding this comment.
No , after request. End first sentence in 'also sometimes called Ajax request.'
Lith
pushed a commit
to Lith/amphtml
that referenced
this pull request
Dec 22, 2016
Lith
pushed a commit
to Lith/amphtml
that referenced
this pull request
Dec 22, 2016
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.
No description provided.