Skip to content

change event

Compare
Choose a tag to compare
@limonte limonte released this 17 May 11:08
· 207 commits to master since this release

Live Demo →
API Documentation →

New features

  • dispatch a change event on user action (#92)

Implementation is aligned with input[type="checkbox"] as it is only fired when the user changes the value by interacting with the component.

  const myCheckbox = document.getElementById('my-checkbox')
  
  myCheckbox.addEventListener('change', () => {
    console.log(myCheckbox.checked)
  })

Styling

  • Remove margin on input[type="checkbox"] (#89) thanks to @abdonrd