You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

focus-visible

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focus-visible - npm Package Compare versions

Comparing version

to
5.2.1

10

package.json
{
"name": "focus-visible",
"version": "5.2.0",
"version": "5.2.1",
"description": "Polyfill for :focus-visible pseudo-selector",
"scripts": {
"build": "rollup -c",
"precommit": "lint-staged",
"prepublishOnly": "npm run test",
"test:server": "http-server . -s",
"test:selenium": "wait-on http://localhost:8080 && node ./test/index.js",
"test": "npm run build && cross-env NODE_ENV=ci concurrently -k --success last \"npm run test:server\" \"npm run test:selenium\"",
"sauce": "npm run build && cross-env NODE_ENV=sauce concurrently -k --success last \"npm run test:server\" \"npm run test:selenium\""
"precommit": "lint-staged"
},

@@ -38,3 +33,2 @@ "lint-staged": {

"ajv": "^6.0.0",
"chromedriver": "^2.38.2",
"clear-module": "^2.1.0",

@@ -41,0 +35,0 @@ "concurrently": "^4.0.0",

24

README.md

@@ -1,2 +0,2 @@

[![Build Status](https://travis-ci.org/WICG/focus-visible.svg?branch=master)](https://travis-ci.org/WICG/focus-visible)
[![Build Status](https://travis-ci.org/WICG/focus-visible.svg?branch=main)](https://travis-ci.org/WICG/focus-visible)

@@ -22,2 +22,10 @@ Based on the proposed CSS

## Support
👋 `:focus-visible` is now [supported in all major browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible#browser_compatibility).
![A browser suppor table showing focus-visible is supported in Chrome 86, Edge 86, Firefox 85, Opera 72, Safari 15.4, all Android browsers, Safari 15.4 on iOS, Android WebView, and Samsung Internet](https://user-images.githubusercontent.com/1066253/208977092-0fdacba7-b1de-4a8f-90f9-880b06dcdb26.png)
We would encourage you to use the CSS selector instead of this polyfill if you are able. We are not currently planning to make any updates or release new versions of the polyfill, but are open to discussion in GitHub issues if changes need to be made for emergencies.
## Installation

@@ -89,16 +97,2 @@

### Dependencies
If you want to use `:focus-visible` with an older browser you'll need to include an additional polyfill for [`Element.prototype.classList`](https://caniuse.com/#feat=classlist).
In accordance with the W3C's new [polyfill
guidance](https://www.w3.org/2001/tag/doc/polyfills/#don-t-serve-unnecessary-polyfills), the
`:focus-visible` polyfill does not bundle other polyfills.
You can use a service like [Polyfill.io](https://polyfill.io) to download only the polyfills needed by the current browser. Just add the following line to the start of your page:
```html
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Element.prototype.classList"></script>
```
### Shadow DOM

@@ -105,0 +99,0 @@

Sorry, the diff of this file is not supported yet