diff options
author | akanass <akanass@icloud.com> | 2021-06-17 17:34:59 +0200 |
---|---|---|
committer | akanass <akanass@icloud.com> | 2021-06-17 17:34:59 +0200 |
commit | f93dc50ffdb5e65c404ca093f45d3c79833f1627 (patch) | |
tree | 2b5632eba893e107dd913c446d722166314814d2 /packages/browser/README.md | |
parent | 27a91965f059b3ee193f944736c03192fafef262 (diff) |
get back ES5 UMD bundle
Diffstat (limited to 'packages/browser/README.md')
-rw-r--r-- | packages/browser/README.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/browser/README.md b/packages/browser/README.md index f281493..d94700b 100644 --- a/packages/browser/README.md +++ b/packages/browser/README.md @@ -9,6 +9,8 @@ - [@simplewebauthn/browser](#simplewebauthnbrowser) - [Installation](#installation) - [UMD](#umd) + - [ES5](#es5) + - [ES2018](#es2018) - [Usage](#usage) ## Installation @@ -23,6 +25,21 @@ npm install @simplewebauthn/browser This package can also be installed via **unpkg** by including the following script in your page's `<head>` element. The library's methods will be available on the global **`SimpleWebAuthnBrowser`** object. +> NOTE: The only difference between the two packages below is that the ES5 bundle includes TypeScript's `tslib` runtime code. This adds some bundle size overhead, but _does_ enable use of `supportsWebAuthn()` in older browsers to show appropriate UI when WebAuthn is unavailable. + +#### ES5 + +If you need to support WebAuthn feature detection in deprecated browsers like IE11 and Edge Legacy, include the `ES5` version: + +```html + +<script src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.es5.umd.min.js"></script> +``` + +#### ES2018 + +If you only need to support modern browsers, include the `ES2018` version: + ```html <script src="https://unpkg.com/@simplewebauthn/browser"></script> |