简体   繁体   English

用于Internet Explorer 11的IntelliJ IDEA JavaScript语言版本

[英]IntelliJ IDEA JavaScript language version for Internet Explorer 11

Is it possible to set the JavaScript language version in IntelliJ IDEA to the exact implementation of Internet Explorer 11? 是否可以将IntelliJ IDEA中的JavaScript语言版本设置为Internet Explorer 11的确切实现? It supports some features of ECMAScript 6, like let and const , but I can't use arrow functions () => {} or for..of loops for (element of array) {} . 它支持ECMAScript 6的某些功能,例如letconst ,但是我不能使用箭头函数() => {}或for..of循环for (element of array) {}

There is no "Internet Explorer 11". 没有“ Internet Explorer 11”。

落下

When clicking on the three dots button ... , I can add a custom language version, but I'm not sure how to import the ECMAScript implementation of Internet Explorer 11. 单击三个点按钮... ,我可以添加自定义语言版本,但不确定如何导入Internet Explorer 11的ECMAScript实现。

设定值

There is no possibility to add a custom language version. 无法添加自定义语言版本。 "Three dots" are used to set different language versions for different folders. “三个点”用于为不同的文件夹设置不同的语言版本。

The JavaScript language version option is used to configure different JavaScript language versions for different folders. JavaScript语言版本选项用于为不同的文件夹配置不同的JavaScript语言版本。 Mote details, you could check this article . 细节,您可以查看这篇文章

IE 11 is just a browser version, you can't set it from here. IE 11只是浏览器版本,您不能从这里设置它。 You can configure custom browser installations using the follow steps: 您可以使用以下步骤配置自定义浏览器安装:

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Web Browsers under Tools. 在“设置/首选项”对话框(Ctrl + Alt + S)中,单击“工具”下的“ Web浏览器”。 The Web Browsers page that opens shows the browsers from the predefined list and the previously configured custom browser installations, if any. 打开的“ Web浏览器”页面显示预定义列表中的浏览器以及先前配置的自定义浏览器安装(如果有)。 For each browser, IntelliJ IDEA shows its name, the family to which it belongs, and the path to the browser's executable file/macOS application or the predefined alias that stands for this path. 对于每个浏览器,IntelliJ IDEA都会显示其名称,其所属的族以及浏览器的可执行文件/ macOS应用程序的路径或代表该路径的预定义别名。

  2. To activate a browser, select the checkbox next to its name. 要激活浏览器,请选中其名称旁边的复选框。 The browser will be added to the context menu of the Open in Browse menu item and its icon will be displayed in the Browsers popup. 该浏览器将添加到“在浏览中打开”菜单项的上下文菜单中,并且其图标将显示在“浏览器”弹出窗口中。

    If the browser was installed according to a standard installation procedure, most likely the alias in the Path field points at the right location. 如果浏览器是根据标准安装过程安装的,则“路径”字段中的别名很可能指向正确的位置。 If it does not, click browseButton.png and select the actual path in the dialog that opens. 如果不是,请单击browserButton.png并在打开的对话框中选择实际路径。

When you select View | 当您选择查看| Open in Browser, or press Alt+F2, or invoke the browser icons bar, the available browsers are shown in the order in which they are listed on the Web Browsers page. 在浏览器中打开,或按Alt + F2或调用浏览器图标栏,可用的浏览器将按照在Web浏览器页面上列出的顺序显示。 To change the order of browsers in the list, use the icons actions previousOccurence svg and icons actions nextOccurence svg buttons. 要更改列表中浏览器的顺序,请使用图标操作previousOccurence svg和图标操作nextOccurence svg按钮。

More information, please refer this link . 更多信息,请参考此链接

It supports some features of ECMAScript 6, like let and const, but I can't use arrow functions () => {} or for..of loops for (element of array) {}. 它支持ECMAScript 6的某些功能,如let和const,但是我不能使用箭头函数()=> {}或for..of循环来使用(数组元素){}。

From your description, I guess perhaps your problem is that the arrow function not working with IE browser. 根据您的描述,我想也许您的问题是箭头功能无法在IE浏览器中使用。 If that is the case, please check this article , as we can see that the arrow function not support IE browser , as a workaround, you could check this thread and try to use Babel's translation of that to ES5. 如果是这种情况,请查看本文 ,因为我们可以看到箭头功能不支持IE浏览器 ,作为一种解决方法,您可以检查该线程并尝试使用Babel将其翻译为ES5。

Here is an article about using Babel polyfill , you could refer to it. 这是一篇有关使用Babel polyfill的文章,您可以参考它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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