JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 215
  • Score
    100M100P100Q101981F
  • License MIT

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

Package Exports

  • makeup-exit-emitter

Readme

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