ES6 `fetch is undefined`

后端 未结 8 908
太阳男子
太阳男子 2020-12-02 16:27

I\'m building a site with ES6 and Babel.

In a script file, I need to make an ajax call to a service on server. For that I\'m doing like this:

fetch(\         


        
8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 17:20

    Window.fetch or fetch is the same... technically fetch() is a global method of the Window object

提交回复
热议问题