Search code examples
javaecmascript-6swtrcp

Is there a way to use EcmaScript 6 in SWT-Browser-View under Windows 10?


I write a RCP application with swt-web-view. I get errors when i try to use EcmaScript 6 Scripts. I found out, that swt uses the IE 11 as default and this browser doesnt sopport ES6. Is there a workaround solution to solve this?


Solution

  • I found a solution here. First you have to set the browser to microsoft edge by setting the property

    -Dorg.eclipse.swt.browser.IEVersion=12001 in eclipse.ini

    in the eclipse.ini file.

    After that use an HTML5 doctype and add a <meta http-equiv="X-UA-Compatible" content="IE=edge"> element to the <head> section to use ecmascript 6