A simple system for declarative actions
A simple system for declarative actions

This patch adds a simple system for declarative actions which allows
us to add a live-event to any element using data-attributes. For now
it supports only click events.

Example:

  // HTML
  <button data-click="open">
  <button data-click="close">

  // JavaScript
  let actions = new Actions(document.body)
  actions
    .add('open', () => { /* ... */ })
    .add('close', () => { /* ... */ })
    .activate()

charted-co/charted,mikesall/charted,mikesall/charted,mikesall/charted,charted-co/charted,charted-co/charted