mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Add documentation regarding nomodule
(#1622)
* Add documentation regarding `nomodule` * Update browser.md * Update browser.md
This commit is contained in:
@@ -41,10 +41,15 @@ ECMAScript module is also available:
|
|||||||
```html
|
```html
|
||||||
<script type="module" type="text/javascript">
|
<script type="module" type="text/javascript">
|
||||||
import katex from 'https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.mjs';
|
import katex from 'https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.mjs';
|
||||||
|
...
|
||||||
</script>
|
</script>
|
||||||
|
<script nomodule defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.js" integrity="sha384-omQnemkEC7UFlIZ175SaCJSWuRHhTjsVtJqXKshMhaJ7OLmAaWmbgLU5TrGGQISk" crossorigin="anonymous"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.css" integrity="sha384-9tPv11A+glH/on/wEu99NVwDPwkMQESOocs/ZGXPoIiLE8MU/qkqUcZ3zzL+6DuH" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.css" integrity="sha384-9tPv11A+glH/on/wEu99NVwDPwkMQESOocs/ZGXPoIiLE8MU/qkqUcZ3zzL+6DuH" crossorigin="anonymous">
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> Use [`nomodule` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes)
|
||||||
|
to provide a fallback for older browsers that do not support ES modules.
|
||||||
|
|
||||||
## Download & Host Things Yourself
|
## Download & Host Things Yourself
|
||||||
Download a [KaTeX release](https://github.com/Khan/KaTeX/releases),
|
Download a [KaTeX release](https://github.com/Khan/KaTeX/releases),
|
||||||
copy `katex.js`, `katex.css`
|
copy `katex.js`, `katex.css`
|
||||||
|
Reference in New Issue
Block a user