This property returns the related target box. Sometimes we need to save some
related information about a certain event. For example, the targetBox of a
mouseWheel event is the current focused box. But we also would like to know when a
mouseWheel event happens, which box is under the mouse cursor. So we use the
relatedTargetBox property to store that information. Different event can use this
relatedTargetBox for different purpose. For now, mouseWheel event is the only event
that utilizes this property.
<box on:mouseWheel="onMouseWheel();"/>
function onMouseWheel()
{
var eventObj = shell.currentEvent;
if (eventObj)
{
// this is the box who is under the mouse cursor
var relatedTargetBox = eventObj.relatedTargetBox;
// this is the current focused box
var targetBox = eventObj.targetBox;
}
}