Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

makeup-exit-emitter

Package Overview
Dependencies
Maintainers
5
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makeup-exit-emitter

Emits custom 'focusExit' event when keyboard focus has exited an element and all of it's descendants

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
120
decreased by-69.85%
Maintainers
5
Weekly downloads
 
Created
Source

makeup-exit-emitter

Build Status Coverage Status Dependency status devDependency status

A vanilla JavaScript port of jquery-focus-exit.

Emits custom 'focusExit' event when focus has exited an element and all of it's descendants.

Experimental

This module is still in an experimental state, until it reaches v1.0.0 you must consider all minor releases as breaking changes. Patch releases may introduce new features, but will be backwards compatible.

Install

// via npm
npm install makeup-exit-emitter

// via yarn
yarn add makeup-exit-emitter

Example

    const ExitEmitter = require('makeup-exit-emitter');

    const el = document.getElementById('#widget1');

    ExitEmitter.addFocusExit(el);

    el.addEventListener('focusExit', function(e){
        console.log(this, e); // outputs (el1, 'focusExit')
    });

Methods

  • addFocusExit(el)
  • removeFocusExit(el)

Events

  • 'focusExit'
    • event.detail
      • fromElement
      • toElement

Dependencies

Polyfills

Development

  • npm start
  • npm test
  • npm run lint
  • npm run fix
  • npm run build
  • npm run clean

Test Reports

Each test run will generate the following reports:

  • /reports/coverage contains Istanbul code coverage report
  • /reports/html contains HTML test report

CI Build

https://travis-ci.org/makeup-js/makeup-exit-emitter

Code Coverage

https://coveralls.io/github/makeup-js/makeup-exit-emitter

Keywords

FAQs

Package last updated on 17 May 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc