snapback-end

The snapback-end event fires after a piece has snapped back to it's original square.

HTML

<chess-board
    style="width: 400px"
    position="start"
    draggable-pieces>
</chess-board>

JavaScript

const board = document.querySelector('chess-board');

board.addEventListener('snapback-end', (e) => {
  const {piece, square, position, orientation} = e.detail;

  console.log('Piece: ' + piece)
  console.log('Square: ' + square)
  console.log('Position: ' + objToFen(position))
  console.log('Orientation: ' + orientation)
  console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
});