2.1.5 [DOM Level 2 - Events] Section 1.3.2, Interaction with HTML 4.0 event listeners
In order to achieve compatibility with HTML 4.0, implementors may view the setting of attributes which represent event handlers as the creation and registration of an EventListener on the EventTarget. The value of useCapture defaults to false. This EventListener behaves in the same manner as any other EventListeners which may be registered on the EventTarget. If the attribute representing the event listener is changed, this may be viewed as the removal of the previously registered EventListener and the registration of a new one. No technique is provided to allow HTML 4.0 event listeners access to the context information defined for each event.
Quirks Mode and IE7 Mode (All Versions)
Setting the attribute name of an event listener with the setAttribute method does not result in the creation and registration of an event listener on the source element.
Quirks Mode, IE7 Mode, and IE8 Mode (All Versions)
When event listeners are created through the setting of attributes, they do not behave in the same manner as other event listeners. These attribute-associated events take precedence and are processed before other events.