From 263e977c8133bfa389fc813ea3e5269ce73ea342 Mon Sep 17 00:00:00 2001 From: Jay Winstead Date: Mon, 9 Apr 2018 13:26:19 -0700 Subject: [PATCH] add promise polyfill documentation --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 380338f4..ac7abe6e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,28 @@ The LaunchDarkly client-side JavaScript SDK supports the following browsers: \* These browsers do not support streaming new flags to connected clients, even when `client.on('change')` is called. +### Promies polyfill +Our SDK provides promise interfaces and uses promises internally. Many modern web browsers support promises, but to ensure the SDK works on older browsers you must include a polyfil such as [es6-promise](https://github.com/stefanpenner/es6-promise). + +You can find a graph showing browser promises support [here](https://caniuse.com/#feat=promises). + +You can load the polyfll via a script tag in the ``: + + + +or load es6-promise from via CDN: + + + + +You can also install the es6-promise polyfill using a package manager: + + yarn add es6-promise + +or + + npm install es6-promise + ### EventSource polyfill If you need streaming support, and you wish to support browsers that do not support `EventSource` natively, you can install a polyfill, such