focux

0.2.0 • Public • Published

focux

detect :focus-within for better UX

npm install focux
const focux = require("focux")

api

focux.within(element)

  • test if element matches :focus-within specification
  • matches even without native :focus-within support
  • element is a DOM element node
  • @return boolean
focux.within(element) // true || false

compatibility

Package Sidebar

Install

npm i focux

Weekly Downloads

4

Version

0.2.0

License

CC0-1.0

Last publish

Collaborators

  • ryanve