How to use the delegated-events.fire function in delegated-events

To help you get started, we’ve selected a few delegated-events examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spectjs / spect / src / on-delegated.js View on Github external
evt.split(/\s+/).forEach(evt => {
      if (target.dispatchEvent) {
        target.dispatchEvent(new CustomEvent(evt, {
          bubbles: true,
          cancelable: true,
          detail
        }))
      }
      else {
        delegate.fire(target, evt, detail)
      }
    })
  }

delegated-events

A small, fast delegated event library.

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis