Is it possible to set the JavaScript language version in IntelliJ IDEA to the exact implementation of 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) {}.

There is no "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.


2 Answers

Oksana On

There is no possibility to add a custom language version. "Three dots" are used to set different language versions for different folders.

Zhi Lv - MSFT On

The JavaScript language version option is used to configure different JavaScript language versions for different folders. Mote details, you could check this article.

IE 11 is just a browser version, you can't set it from here. You can configure custom browser installations using the follow steps:

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Web Browsers under Tools. The Web Browsers page that opens shows the browsers from the predefined list and the previously configured custom browser installations, if any. 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.

  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.

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. To change the order of browsers in the list, use the icons actions previousOccurence svg and icons actions nextOccurence svg buttons.

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) {}.

From your description, I guess perhaps your problem is that the arrow function not working with IE browser. 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.

Here is an article about using Babel polyfill, you could refer to it.