property sourceData

(r/o) transferData sourceData;

Typ

Zugriff

This property returns a transferData object. We can get data from this object or set data to this object.
<box on:dragStart="onDragStart();"/>

function onDragStart()
{
    var eventObj = shell.currentEvent;
    if (eventObj)
    {
        var dataObj = eventObj.sourceData;
        if (dataObj)
        {
            // feed the data object with some data when we start dragging a box,
            // so later when the box is over a target, or when it is drop onto a target,
            // we can retrieve this data back.
            dataObj.addString("text/plain", "http://www.aol.com");
        }
    }
}