简体   繁体   中英

Getting syntax error in Microsoft edge in javascript

In Edge, I am running some await async code, and I keep getting a syntax error but it doesn't say what it specifically does not like about it. It works in Chrome too. In console of Edge I get

在此处输入图像描述

and when I click on it, it goes here

在此处输入图像描述

But I don't see why it is complaining about syntax.

Does anyone know?

Thanks

You're using dynamic import which is not supported by Edge Legacy .

You could use it in Edge Chromium which can support dynamic import well. If you want to use it in Edge Legacy, you could try to use dynamic-import-polyfill . It's a polyfill for dynamic import() that works in all module-supporting browsers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM