Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix polyfill mdx #861

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/docs/tutorials/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ yarn add @egjs/svelte-flicking
</Tabs>

## CDN Links
Unlike individual or internal cases, CDN has unpredictable problems with services, so it is better to use your own files.

### packaged(with dependencies)
```html
<!-- unpkg -->
Expand Down
25 changes: 25 additions & 0 deletions docs/docs/tutorials/polyfills.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ custom_edit_url: null
sidebar_position: 6
---

### Before
Flicking is based on es5 and additionally needs es6 Promise to work properly.
es5 is basically supported on IE9+ ([Source](http://kangax.github.io/compat-table/es5/))
So, only es6 Promise is needed to run Flicking on the older browsers.
Expand All @@ -14,4 +15,28 @@ So, only es6 Promise is needed to run Flicking on the older browsers.
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js"></script>
```

Adding the above script will make Flicking run on the older browsers.

### After


Flicking is based on es5 and additionally needs es6 Promise to work properly.
es5 is basically supported on IE9+ ([Source](http://kangax.github.io/compat-table/es5/))
So, only es6 Promise is needed to run Flicking on the older browsers.

* How to use it via CDN (For personal or internal use)
```html
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js"></script>
```
* How to use it yourself (Unlike individual or internal cases, CDN has unpredictable problems with services, so it is better to use your own files.)
```
# Download
https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js
```
* How to use it via module (The pollution of the global scope)
```js
require('es6-promise').polyfill();
```


Adding the above script will make Flicking run on the older browsers.
2 changes: 1 addition & 1 deletion docs/docs/tutorials/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import TabItem from '@theme/TabItem';
]}>
<TabItem value="js">

Add the script/CSS to the page.
Add the script/CSS to the page. (Unlike individual or internal cases, CDN has unpredictable problems with services, so it is better to use your own files.)
```html
<script src="https://unpkg.com/@egjs/flicking/dist/flicking.pkgd.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://unpkg.com/@egjs/flicking/dist/flicking.css" crossorigin="anonymous" />
Expand Down
Loading