Remove a pane

Example

Click the button to remove the right pane. For more details, see the removePane API.

<button id="remove-pane">Remove Pane 2</button>
<div id="container" style="width: 400px; height: 260px"></div>
const bwin = new BinaryWindow({
  fitContainer: true,
  children: [
    { position: 'left', id: 'pane-1', content: 'Pane 1' },
    {
      position: 'right',
      id: 'pane-2',
      content: 'Pane 2',
    },
  ],
});

bwin.mount(document.getElementById('container'));

document.getElementById('remove-pane').addEventListener('click', () => {
  bwin.removePane('pane-2');
});