Skip to content
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

Update amp-form docs and add an expanded note on CORS security. #4485

Merged
merged 4 commits into from
Aug 17, 2016

Conversation

mkhatib
Copy link
Contributor

@mkhatib mkhatib commented Aug 12, 2016

ITI: #3343

@erwinmombay
Copy link
Member

adding @dvoytenko to this since he has done a few of the CORS documentation

__optional__
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 that action and has the same action requirement above.
Copy link
Contributor

Choose a reason for hiding this comment

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

"than action" and let's make it action.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, "requirements" (plural)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@dvoytenko
Copy link
Contributor

LGTM

@dvoytenko
Copy link
Contributor

LGTM with few comments


## Events
`amp-form` exposes 3 events:
**submit**
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a line before this line. The "submit" line is showing up at the end of the above line with the colon.

Might also want to consider making these three a bulleted list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -75,7 +75,108 @@ __required__

Action must be provided, `https` and is non-cdn link (does **NOT** link to https://cdn.ampproject.org).

**action-xhr**
__optional__
Copy link
Member

Choose a reason for hiding this comment

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

add parentheses on optional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

All other [form attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) are optional.

## Inputs
Currently, `<input type=button>`, `<input type=file>`, `<input type=image>` and `<input type=password>` are not allowed. (This might be reconsidered in the future - please let us know if you require these and use cases).

## Events
`amp-form` exposes 3 events:
Copy link
Member

Choose a reason for hiding this comment

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

this is formatted wrong, theres no new line before submit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in subsequent pushes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mkhatib mkhatib merged commit 216c45f into ampproject:master Aug 17, 2016
@mkhatib mkhatib deleted the forms-cors-security-docs branch August 17, 2016 21:47
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.

4 participants