Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Add es6 polyfill to all examples (#1171)
Browse files Browse the repository at this point in the history
**what is the change?:**
Draft uses some ES6 syntax and assumes users will pair it with an ES6
polyfill. See
https://github.com/facebook/draft-js/blob/c12640f05e8328f5c97902c0c5e94a02ba9f58be/docs/Advanced-Topics-Issues-and-Pitfalls.md#polyfills

**why make this change?:**
When testing some examples in IE they were not rendering, and threw an
error because we use `String.prototype.startsWith` in Draft.

**test plan:**
Open the 'convertFromHTML' and 'media' example files in IE, and they
will render.

**issue:**
#1165
  • Loading branch information
flarnie authored Apr 24, 2017
1 parent 42ac4cf commit 1f1e665
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/draft-0-10-0/convertFromHTML/convert.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<script src="../../../node_modules/react-dom/dist/react-dom.js"></script>
<script src="../../../node_modules/immutable/dist/immutable.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.js"></script>
<script src="../../../node_modules/es6-shim/es6-shim.js"></script>
<script src="../../../dist/Draft.js"></script>
<script type="text/babel">
'use strict';
Expand Down
1 change: 1 addition & 0 deletions examples/draft-0-10-0/media/media.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<script src="../../../node_modules/react/dist/react.js"></script>
<script src="../../../node_modules/react-dom/dist/react-dom.js"></script>
<script src="../../../node_modules/immutable/dist/immutable.js"></script>
<script src="../../../node_modules/es6-shim/es6-shim.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.js"></script>
<script src="../../../dist/Draft.js"></script>
<script type="text/babel">
Expand Down
1 change: 1 addition & 0 deletions examples/draft-0-9-1/convertFromHTML/convert.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<script src="../../../node_modules/react/dist/react.js"></script>
<script src="../../../node_modules/react-dom/dist/react-dom.js"></script>
<script src="../../../node_modules/immutable/dist/immutable.js"></script>
<script src="../../../node_modules/es6-shim/es6-shim.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.js"></script>
<script src="../../../dist/Draft.js"></script>
<script type="text/babel">
Expand Down
1 change: 1 addition & 0 deletions examples/draft-0-9-1/media/media.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<script src="../../../node_modules/react/dist/react.js"></script>
<script src="../../../node_modules/react-dom/dist/react-dom.js"></script>
<script src="../../../node_modules/immutable/dist/immutable.js"></script>
<script src="../../../node_modules/es6-shim/es6-shim.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.js"></script>
<script src="../../../dist/Draft.js"></script>
<script type="text/babel">
Expand Down

0 comments on commit 1f1e665

Please sign in to comment.