Skip to content

Instantly share code, notes, and snippets.

@tracker1
Last active December 16, 2015 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tracker1/6ab972b2a4c929ddc95c to your computer and use it in GitHub Desktop.
Save tracker1/6ab972b2a4c929ddc95c to your computer and use it in GitHub Desktop.
IE8 Shims (react-bootstrap)

Edit: Possibly a better option for all browsers.

<script src="//cdn.polyfill.io/v2/polyfill.min.js?features=es5,es6,es7,Promise,fetch,html5-elements,viewport&flags=gated"></script>

IE8 Shims

Below are the shims I'm currently using for a React app in conjunction with Bootstrap (react-bootstrap)

<!--[if lt IE 9]>
  <script>
    (function(){
      var ef = function(){}; 
      window.console = window.console || {log:ef,warn:ef,error:ef,dir:ef};
    }());
  </script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv-printshiv.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/3.4.0/es5-shim.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/3.4.0/es5-sham.js"></script>
<![endif]-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment