事件和事件对象如何在 amp-story 中工作?是否有完整的 AMP 事件和操作列表?是否有 amp-story 的完整列表?
How do events and event objects work in amp-story? Is there a full list of AMP events and actions? Is there a full list for amp-story?
So far, the only event we've seen is tap, and the only actions we've seen are open, close, and dismiss. You might be curious about what others are available. While tap applies to all elements, most events in AMP are specific to particular elements. For example, forms have submit , submit-success, and submit-error events, and input elements have a change event , while amp-selector has a select event, to name a few. There are many more; for a full list of AMP events and actions, see Appendix B, Actions and Events.
Event Objects
When an event occur in HTML, the event belongs to a certain event object, like a mouse click event belongs to the MouseEvent object.
The Event Object
All event objects are based on the Event Object, and inherits all of it's properties and methods
常见事件对象
- AnimationEvent CSS 个动画
- ClipboardEvent 用于修改剪贴板
- DragEvent 用于拖放交互
- FocusEvent 用于与焦点相关的事件
- HashChangeEvent 用于更改锚点部分URL
- InputEvent 用于用户输入
- KeyboardEvent 用于键盘交互
- MouseEvent 用于鼠标交互
- PageTransitionEvent 用于导航到网页和离开网页
- PopStateEvent 用于更改历史条目
- ProgressEvent 为加载外部资源的进度
- StorageEvent 用于 window 存储区的变化。
- TouchEvent 用于触摸交互
- CSS 转换的 TransitionEvent
- UiEvent 用于用户界面交互
- WheelEvent 用于鼠标滚轮交互
通常可以在 AMP Actions and Events documentation 中找到 AMP 的完整列表。
对于 AMP 故事,目前不支持任何事件。
So far, the only event we've seen is tap, and the only actions we've seen are open, close, and dismiss. You might be curious about what others are available. While tap applies to all elements, most events in AMP are specific to particular elements. For example, forms have submit , submit-success, and submit-error events, and input elements have a change event , while amp-selector has a select event, to name a few. There are many more; for a full list of AMP events and actions, see Appendix B, Actions and Events.
Event Objects
When an event occur in HTML, the event belongs to a certain event object, like a mouse click event belongs to the MouseEvent object.
The Event Object
All event objects are based on the Event Object, and inherits all of it's properties and methods
常见事件对象
- AnimationEvent CSS 个动画
- ClipboardEvent 用于修改剪贴板
- DragEvent 用于拖放交互
- FocusEvent 用于与焦点相关的事件
- HashChangeEvent 用于更改锚点部分URL
- InputEvent 用于用户输入
- KeyboardEvent 用于键盘交互
- MouseEvent 用于鼠标交互
- PageTransitionEvent 用于导航到网页和离开网页
- PopStateEvent 用于更改历史条目
- ProgressEvent 为加载外部资源的进度
- StorageEvent 用于 window 存储区的变化。
- TouchEvent 用于触摸交互
- CSS 转换的 TransitionEvent
- UiEvent 用于用户界面交互
- WheelEvent 用于鼠标滚轮交互
通常可以在 AMP Actions and Events documentation 中找到 AMP 的完整列表。
对于 AMP 故事,目前不支持任何事件。