New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

focus-within-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-within-polyfill

focus-within pseudo selector polyfill

  • 1.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-19.81%
Maintainers
1
Weekly downloads
 
Created
Source

:focus-within Pseudo-Class Polyfill

npm version Build Status

The :focus-within CSS pseudo-class represents an element that has received focus or contains an element that has received focus. In other words, it represents an element that is itself matched by the :focus pseudo-class or has a descendant that is matched by :focus.

More information on MDN.

How to use

This package is available both as production ready script and as a package. The script can be downloaded here, or installed with a package manager.

# npm
npm install focus-within-polyfill --save

# yarn
yarn add focus-within-polyfill

When the polyfill is included via a script tag it will create a focusWithin object with a loadPolyfill and a unloadPolyfill method to initialize the code. On the other hand when imported as a dependency the same methods are exposed.

/* ES6 */
import { polyfill, unloadPolyfill } from 'focus-within-polyfill'

polyfill() 			// load polyfill
unloadPolyfill()	// unload polyfill


/* ES5 */
<script src='path/to/focus-within-polyfill.js'></script>

focusWithin.polyfill()			// load polyfill
focusWithin.unloadPolyfill() 	// unload polyfill

Browser Support

  • Natively supported in Chrome
  • Natively supported in Firefox
  • Natively supported in Safari
  • Natively supported in Opera
  • IE 11
  • Edge

Keywords

FAQs

Package last updated on 23 Apr 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