Skip to content

Commit

Permalink
Remove malicious polyfill.io usage
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhamlett committed Jun 25, 2024
1 parent 5dbea28 commit 65fc085
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1106,18 +1106,10 @@ example.setChoiceByValue('Two'); // Choice with value of 'Two' has now been sele
Choices is compiled using [Babel](https://babeljs.io/) targeting browsers [with more than 1% of global usage](https://github.com/jshjohnson/Choices/blob/master/.browserslistrc) and expecting that features [listed below](https://github.com/jshjohnson/Choices/blob/master/.eslintrc.json#L62) are available or polyfilled in browser.
You may see exact list of target browsers by running `npx browserslist` within this repository folder.
If you need to support a browser that does not have one of the features listed below,
I suggest including a polyfill from the very good [polyfill.io](https://polyfill.io/v3/):
**Polyfill example used for the demo:**
```html
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Array.from%2Ces5%2Ces6%2CSymbol%2CSymbol.iterator%2CDOMTokenList%2CObject.assign%2CCustomEvent%2CElement.prototype.classList%2CElement.prototype.closest%2CElement.prototype.dataset%2CArray.prototype.find%2CArray.prototype.includes"></script>
```
**Features used in Choices:**
```polyfills
```
Array.from
Array.prototype.find
Array.prototype.includes
Expand Down
4 changes: 0 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
<link rel="stylesheet" href="assets/styles/base.min.css" />
<!-- End ignore these -->

<!-- Optional includes -->
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Array.from%2Ces5%2Ces6%2CSymbol%2CSymbol.iterator%2CDOMTokenList%2CObject.assign%2CCustomEvent%2CElement.prototype.classList%2CElement.prototype.closest%2CElement.prototype.dataset%2CArray.prototype.find%2CArray.prototype.includes%2Cfetch"></script>
<!-- End optional includes -->

<!-- Choices includes -->
<link rel="stylesheet" href="assets/styles/choices.min.css" />
<script src="assets/scripts/choices.js"></script>
Expand Down

0 comments on commit 65fc085

Please sign in to comment.