Skip to content

Commit

Permalink
Merge pull request #140 from HugoGiraudel/install-instructions
Browse files Browse the repository at this point in the history
Apply further install instructions improvements
  • Loading branch information
KittyGiraudel authored Feb 16, 2021
2 parents 20f7ef4 + ec24e69 commit 06bdda0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,24 @@ import 'a11y-dialog'

### Using a CDN

If you prefer loading `a11y-dialog` from a third-party CDN such as jsdelivr, you can do so by adding this script tag in your HTML (use the version of your choice—ideally the latest one):
If you prefer loading `a11y-dialog` from a third-party CDN such as jsdelivr or unpkg, you can do so by adding this script tag in your HTML:

```html
<script
defer
src="https://cdn.jsdelivr.net/npm/a11y-dialog@6.0.0/dist/a11y-dialog.min.js"
src="https://cdn.jsdelivr.net/npm/a11y-dialog@6/dist/a11y-dialog.min.js"
></script>
```

If you intend to use ES modules, you can use the ESM version of script (from v6.0.0 onwards only):

```html
<script
defer
src="https://cdn.jsdelivr.net/npm/a11y-dialog@6.0.0/dist/a11y-dialog.esm.min.js"
type="module"
></script>
<script type="module">
import A11yDialog from 'https://cdn.jsdelivr.net/npm/a11y-dialog@6/dist/a11y-dialog.esm.min.js'
const container = document.querySelector('#my-dialog-container')
const dialog = new A11yDialog(container)
</script>
```

## Usage
Expand Down

0 comments on commit 06bdda0

Please sign in to comment.