定义事件和一个事件对象。
首先你得定义事件接口。
一种比较好的方法是创建一个定义事件的接口。
A better way is to create an interface that defines the events.
我怎么火从聚合物镖自定义事件?
调用您自己的任何自定义事件!
当生成引发自定义事件时发生。
要真正响应事件,必须在实现文件内定义事件表。
To actually respond to events, you must define the event table within your implementation files.
对于您关心的那些事件,必须定义事件处理程序。
You need to define event handlers for just those things you care about.
你如何调度和听在聚合物中的自定义事件?
How do you dispatch and listen for custom events in Polymer?
通常不需要提供自己的自定义事件访问器。
You do not typically need to provide your own custom event accessors.
首先,我们必须定义事件以通知使用这个特殊的内容扩展。
First, we must define events that will signal the use of this particular content extension.
任何对象都可以定义事件,并且多个对象可以侦听这些事件。
Any object can define events, and multiple objects can listen to them.
对于处理程序,您需要定义事件(如get)、处理程序和条件。
For handlers, you define the event (such as GET), the handler, and a condition.
如果您创建自定义控件并想定义事件,请使用与此类似的代码。
If you create custom control and want to define an event, use code similar to this.
清单4展示这个示例事件定义的代码。
清单3展示这个示例事件定义的代码。
清单5展示了这个示例事件定义的代码。
清单6展示了这个示例事件定义的代码。
清单2展示了这个示例事件定义的代码。
本小节介绍如何向您的小部件定义文件添加事件定义。
This section describes how to add event definitions to your widget definition file.
现在您需要为该事件定义一个操作。
定义一个事件侦听器并将其注册至视图。
相反,可以定义您自己的事件以及触发它们时会发生什么。
Instead, you can define your own events and what should happen when they're triggered.
您还可以在嵌套事件定义时对其进行引用。
You can also refer to them when you are nesting event definitions.
定义启动所需数量的事件处理程序的循环。
Define a loop that starts the required number of event handlers.
定义触发该进程的事件。
最后,需要定义简单的事件处理程序,如清单5所示。
Finally, you define the simple event handler shown in Listing 5.
然而,它不定义足够的事件来完整地报告dtd。
However it does not define enough events to completely report on the DTD.
非洲精神将超越一切,定义这个重要事件。
More than anything else, the spirit of Africa will define this important event.
非洲精神将超越一切,定义这个重要事件。
More than anything else, the spirit of Africa will define this important event.
应用推荐