Event Model Compatibility Test Page (Quirky HTML)

Test Results

Table of Test Results
Results of the browser event handling tests. Each column corresponds to a different method for dispatching/triggering the event. Each row corresponds to a different method for listening for the event. The number in each cell indicates the number of times that the event was received. Successful tests should be received exactly once.
Loading...
Test Parameters

Dispatch Methods

call by name
A method with the same name as the event is invoked on the target element. For example, target.click() is called for the click event.
dispatchEvent
An event is created using document.createEvent and dispatched using document.dispatchEvent as specified in the DOM Level 2 Events Specification.
fireEvent
The fireEvent method is invoked on the target element with the event name as its argument, as described in the Microsoft documentation.
framework method
If a JavaScript framework which supports native event dispatch is selected, the event is created and dispatched according to the method described in the documentation for the framework.

Listen Methods

addEventListener
An event listener function is attached to the target element using the addEventListener method on that element, as specified in the DOM Level 2 Events Specification.
attachEvent
An event listener function is attached to the target element using the attachEvent method on that element, as described in the Microsoft Documentation.
framework method
If a JavaScript framework is selected, the event listener is added to the target according to the method described in the documentation for the framework.
onevent
An event listener function is assigned to a property on the target element with the name of the event prefixed by "on".

Additional Testing

Note that the event models may behave differently based on the document type detected by the browser. This is particularly true on Internet Explorer where Quirks, Strict, and XHTML (for IE9) are handled quite differently. To see these differences, view this page as either XHTML or Quirky HTML.

Background Information

The reason that this test page exists and some of the background for why it was created is discussed in a post on the Digital Engine Blog.