Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
robdodson authored Jun 27, 2024
1 parent 6501c93 commit 9fbee13
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,6 @@ The script uses two heuristics to determine whether the keyboard is being (or wi
following a keyboard event which activates an element or causes a mutation;
this still needs to be implemented._

### 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

It could be very expensive to apply this polyfill automatically to every shadow
Expand Down

0 comments on commit 9fbee13

Please sign in to comment.