Double Execution of onload and onreadystatechange Events (1108 / 1208 / 1308 / 1408)

AdminStudio 2021 | 21.0 | Application Manager

For this browser compatibility test, the web application contents are scanned for the presence of both onload and onreadystatechange events that are attached to a single SCRIPT element.

Test Group/Test Category

1308—Browser Compatibility/Internet Explorer 11
1408—Browser Compatibility/Microsoft Edge

Severity

Warning

Message

This web application contains both the "onload" and "onreadystatechange" events attached to a single SCRIPT element (File: [FILE_NAME], Events: onload, onreadystatechange).

Background

The Internet Explorer 11 and later Standards mode includes support for the standards-based and interoperable onload event for SCRIPT elements. Internet Explorer 10 and earlier include support for only the non-interoperable onreadystatechange event for SCRIPT elements. For compatibility with existing web sites, the onreadystatechange event is still supported in Internet Explorer 11 Standards mode. However, sites that register for both onload and onreadystatechange events may now have two callbacks, but in earlier versions of Internet Explorer, there may be only one. A part of the web application functionality may fail to work, or it may produce unexpected results.

Resolution

The web application should be re-engineered to use only the onload event for scripts that require a load event.

See Also