Search
ItemEventArgs.rawEventArgs Property
See Also
 






Gets the JavaScript event data.

Namespace: MindFusion.Common.UI
File: EventArgs.js

 Syntax

JavaScript  Copy Code

get rawEventArgs() {}

 Property Value

Object. The JavaScript event data.

 Remarks

The rawEventArgs object gives you access to the raw event data that the JavaScript API provides.

 Example

The following code adds an event listener to the itemMouseDown event of a TreeView. The itemMouseDown event provides event data through ItemEventArgs object.

JavaScript  Copy Code

var ui = MindFusion.Common.UI;

// Create a new TreeView control.
var tree = new ui.TreeView();

tree.itemMouseDown.addEventListener(nodeMouseDown);

// This is the handler function for tree itemMouseDown event.
// Modify the menu accordingly and show it on right mouse button click.
function nodeMouseDown(sender, args)
{
 var node = args.item;
 //if the right mouse button has been pressed
 if (args.rawEventArgs.button == 2)
 {
   //do something
 }
}

 See Also