SCRIPT5009: 'fetch' is undefined

后端 未结 1 568
臣服心动
臣服心动 2020-12-21 03:20

have some troubles! For my requests i\'m using Fetch API!

Submit form don\'t work in IE, because of \"SCRIPT5009: \'fetch\' is undefined\"!

Example how it\'s

相关标签:
1条回答
  • 2020-12-21 04:10

    You can use https://github.com/github/fetch instead.

    CDN: https://cdnjs.com/libraries/fetch

    <script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.js"></script>
    

    If you need Promise polyfill you can use http://bluebirdjs.com/docs/install.html

    <script src="//cdn.jsdelivr.net/bluebird/3.5.0/bluebird.min.js"></script>
    

    Load Bluebird before fetch:

    <script src="//cdn.jsdelivr.net/bluebird/3.5.0/bluebird.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.js"></script>
    
    0 讨论(0)
提交回复
热议问题