如果用户单击元素中突出显示的“this ”,一个事件就会沿着图1中红色的路线移动,这代表捕获阶段。
If a user clicks on the emphasized "this" in the element, an event will begin to travel along the red path in Figure 1; this represents the capture phase.
只要在事件处理过程或响应阶段发生未被捕获的异常,voidrespond (RuntimeException,RequestCycle)都会被调用以便生成合适的异常响应。
Void respond (RuntimeException, RequestCycle) is called whenever an uncaught exception occurs during the event handling or response phase so that an appropriate exception response can be generated.
当一个事件发生时(比如单击或者鼠标划过),捕获阶段就开始了。
When an event occurs (a click or a mouse-over, for example) the capture phase begins.
如果需要设置事件观测者,应该使用捕获阶段还是冒泡阶段呢?
If you need to set up an event observer, should you use the capture or bubbling phase? Here are a few guidelines.
某些事件(如 focus)不参与冒泡阶段,因此只能在捕获阶段观测,或者直接在目标上观测。
Some events like focus do not participate in the bubbling phase, and thus can only be observed during the capture phase or directly at the target.
事件从捕获阶段开始。
我想防止事件扩散到儿童和鼓泡起来当条件满足的父母在捕获阶段。
I want to prevent events from trickling down to the children and bubbling up again when a condition is met for the parent during the capturing phase.
这样就会阻止冒泡阶段事件的继续传播。 阻止捕获阶段的事件传播是不可能的。 有人也许会问为什么。
The event travels upwards again and checks if any ancestor element of the target has an event handler for the bubbling phase.
这样就会阻止冒泡阶段事件的继续传播。 阻止捕获阶段的事件传播是不可能的。 有人也许会问为什么。
The event travels upwards again and checks if any ancestor element of the target has an event handler for the bubbling phase.
应用推荐