How to use the delegated-events.off 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-delegate-it.js View on Github external
off = () => {
      delegate.off(evt, target, cb)
      let idx = listeners.indexOf(cb)
      if (idx >= 0) listeners.splice(idx, 1)
    }
  }
github goblindegook / littlefoot / src / dom / events.ts View on Github external
return () => {
    document.removeEventListener('touchend', toggleOnTouch)
    document.removeEventListener('click', toggleOnTouch)
    document.removeEventListener('keyup', dismissOnEscape)
    document.removeEventListener('gestureend', throttledReposition)
    window.removeEventListener('scroll', throttledReposition)
    window.removeEventListener('resize', throttledResize)
    off('mouseover', SELECTOR_FOOTNOTE, showOnHover)
    off('mouseout', SELECTOR_FOOTNOTE, hideOnHover)
  }
}
github spectjs / spect / src / on-delegated.js View on Github external
off = () => {
      delegate.off(evt, target, cb)
      let idx = listeners.indexOf(cb)
      if (idx >= 0) listeners.splice(idx, 1)
    }
  }
github goblindegook / littlefoot / src / dom / events.ts View on Github external
return () => {
    document.removeEventListener('touchend', toggleOnTouch)
    document.removeEventListener('click', toggleOnTouch)
    document.removeEventListener('keyup', dismissOnEscape)
    document.removeEventListener('gestureend', throttledReposition)
    window.removeEventListener('scroll', throttledReposition)
    window.removeEventListener('resize', throttledResize)
    off('mouseover', SELECTOR_FOOTNOTE, showOnHover)
    off('mouseout', SELECTOR_FOOTNOTE, hideOnHover)
  }
}
github fanfoujs / space-fanfou / src / features / floating-status-form / replay-and-repost@page.js View on Github external
onUnload() {
      off('click', '#stream ol .op .reply', onClickReply)
      off('click', '#stream ol .op .repost', onClickRepost)
    },
  }
github fanfoujs / space-fanfou / src / features / show-contextual-statuses / fix-reply-and-repost@page.js View on Github external
onUnload() {
      off('click', `.${CLASSNAME_CONTAINER} .op .reply`, onClickReply)
      off('click', `.${CLASSNAME_CONTAINER} .op .repost`, onClickRepost)
    },
  }
github fanfoujs / space-fanfou / src / features / floating-status-form / replay-and-repost@page.js View on Github external
onUnload() {
      off('click', '#stream ol .op .reply', onClickReply)
      off('click', '#stream ol .op .repost', onClickRepost)
    },
  }
github fanfoujs / space-fanfou / src / features / show-contextual-statuses / fix-reply-and-repost@page.js View on Github external
onUnload() {
      off('click', `.${CLASSNAME_CONTAINER} .op .reply`, onClickReply)
      off('click', `.${CLASSNAME_CONTAINER} .op .repost`, onClickRepost)
    },
  }
github fanfoujs / space-fanfou / src / features / check-saved-searches / sidebar-indicators@page.js View on Github external
onUnload() {
      removeIndicators()
      off('click', SELECTOR_KEYWORD_LINK, onClick, { capture: true })
      unregisterBroadcastListener(onBroadcast)
    },
  }

delegated-events

A small, fast delegated event library.

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis