0.4.1 • Published 1 year ago

makeup-exit-emitter v0.4.1

Weekly downloads
95
License
MIT
Repository
github
Last release
1 year ago

makeup-exit-emitter

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

Experimental

This module is still in an experimental state; until it reaches v1, all minor releases must be considered as breaking changes.

Example

import ExitEmitter from '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

0.4.1

1 year ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

3 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago