Search
EventDispatcher.addEventListener Method
See Also
 






Subcribes an event listener to this event.

Namespace: MindFusion.Common
File: EventDispatcher.js

 Syntax

JavaScript  Copy Code

function addEventListener (handler)

 Parameters

handler

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