MindFusion.Charting for JavaScript Programmer's Guide
EventDispatcher.addEventListener Method
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML

C#
Visual Basic
Java
JavaScript
C++
XAML

Subcribes an event listener to this event.

Namespace: MindFusion.Common
File: EventDispatcher.js

## Syntax

JavaScript Copy Code
function addEventListener (handler)

### Parameters

handler

  Type: function
  function. The handler function.

## Example

The following code handles the controlUnload event of the Window class.

JavaScript Copy Code
// Handle the controlUnload event. window1.controlUnload.addEventListener(handleWindowUnload); // This is the handler function of the wndow1.controlUnload event. // The sender argument is a reference to the Window. function handleWindowUnload(sender) { // Hide the window header. sender.dispose(); }

## See Also

EventDispatcher Members
EventDispatcher Class
MindFusion.Common Namespace