<box on:dragDrop="onDragDrop();"/> function onDragDrop() { var eventObj = shell.currentEvent; if (eventObj && eventObj.targetBox && eventObj.sourceBox) { // move the box we are dragging under the targetBox eventObj.targetBox.addChild(eventObj.sourceBox); } }