Socket
Socket
Sign inDemoInstall

active-event-stack

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    active-event-stack

Manage groups of event handlers so that only the last group can respond to events


Version published
Weekly downloads
552
decreased by-13.75%
Maintainers
1
Install size
1.22 MB
Created
Weekly downloads
 

Readme

Source

Active Event Stack

This maintains one central stack, where each item is a series of event handlers. This stack allows multiple dialogs to overlap, but a keyboard action to only affect the top item.

Usage

var eventStack = require('active-event-stack');

// On mounting or creating an element, add a new listenable (a series of event listeners)
this.eventToken = eventStack.addListenable([
  ['click', this.clickHandler],
  ['keydown', this.keydownHandler]
]);

// On dismounting or removing an element, remove the listenable by its token
eventStack.removeListenable(this.eventToken);

Keywords

FAQs

Last updated on 28 Jun 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc