Table of contentsAppendices |
1.3 Default actions and cancelable eventsDefault actions and cancelable events
Implementations may have a default action associated with an event
type. An example is the [HTML40]
form element. When the user submits the form (e.g. by pressing on
a submit button), the event The default actions are not part of the DOM Event flow. Before invoking a default action, the implementation must first dispatch the event as described in the [DOM event flow]. A cancelable event is an event associated with a default action which is allowed to be canceled during the DOM event flow. At any phase during the event flow, the triggered event listeners have the option of canceling the default action or allowing the default action to proceed. In the case of the hyperlink in the browser, canceling the action would have the result of not activating the hyperlink. Not all events defined in this specification are cancelable events. Different implementations will specify their own default actions, if any, associated with each event. The DOM Events specification does not attempt to specify these actions. This specification does not provide mechanisms for accessing default actions or adding new ones. NOTE: |