8.1.1.1 DOMActivate
8.1.1.1. DOMActivate
Тип
DOMActivate
Интерфейс
UIEvent
Синхронность / Асинхронность
Синхронно
Всплытие
Да
Доверенные цели
Element
Отменяемость
Да
Композиция
Да
Действие по умолчанию
Нет
Context(trusted events)
Event.target : element being activated
UIEvent.view : Window
UIEvent.detail : 0
A user agent MUST dispatch this event when a button, link, or other state-changing element is activated.
The DOMActivate event type is defined in this specification for reference and completeness, but this specification deprecates the use of this event type in favor of the related event type click. Other specifications MAY define and maintain their own DOMActivate event type for backwards compatibility.
While DOMActivate and click are not completely equivalent, implemented behavior for the click event type has developed to encompass the most critical accessibility aspects for which the DOMActivate event type was designed, and is more widely implemented. Content authors are encouraged to use the click event type rather than the related mousedown or mouseup event type to ensure maximum accessibility.
Implementations which support the DOMActivate event type SHOULD also dispatch a DOMActivate event as a default action of a click event which is associated with an activation trigger. However, such implementations SHOULD only initiate the associated activation behavior once for any given occurrence of an activation trigger.
The DOMActivate event type is REQUIRED to be supported for XForms [XFORMS11], which is intended for implementation within a host language. In a scenario where a plugin or script-based implementation of XForms is intended for installation in a native implementation of this specification which does not support the DOMActivate event type, the XForms user agent has to synthesize and dispatch its own DOMActivate events based on the appropriate activation triggers.
Thus, when a click event is dispatched by a user agent conforming to UI Events, the XForms user agent has to determine whether to synthesize a DOMActivate event with the same relevant properties as a default action of that click event. Appropriate cues might be whether the click event isTrusted, or whether its event target has a DOMActivate event listener registered.
Don’t rely upon the interoperable support of DOMActivate in many user agents. Instead, the click event type should be used since it will provide more accessible behavior due to broader implementation support.
The DOMActivate event type is deprecated in this specification.