Position Object

Pass a Position Object as the second argument to initialize the board to a specific position.

HTML

<chess-board style="width: 400px"></chess-board>

JavaScript

const board = document.querySelector('chess-board');
board.position = {
  d6: 'bK',
  d4: 'wP',
  e4: 'wK'
};