events). An example is the "onload" event of the <body> tag.
Modern browsers have special methods that allow multiple event handlers to be attached to the same event of the same object. However, the methods are different for different browsers. Some browsers use the addEventListener method, while some browsers use the attachEvent method.
JsChartViewer.addEventListener is a utility method that calls the target object's addEventListener method if the method exists, or the attachEvent method if it does not exist. Using this method an avoid writing different code to handle different browsers.
Note: This is a static method (class method). It should be accessed as JsChartViewer.addEventListener, not objName.addEventListener.
© 2017 Advanced Software Engineering Limited. All rights reserved.