Skip to Main Content

ECMAScript Version

user6435361Mar 11 2016 — edited Mar 16 2016

Hi,

Which ECMAScript Specification does the JavaFX 8 WebEngine component support? I know it's using WebKit, which in turn uses the JavaScriptCore engine (JavaScriptCore – WebKit), whose latest version implements ECMAScript 6. However, it's new spec, so I suppose the JavaFX 8 has an older version because trying out the new arrow syntax for anonymous function ( x => x+1 rather than function(x) { return x+1; }) doesn't work.

More importantly, when there is a JavaScript error, I can't seem to find a way to detect and report it. I tried these ideas:

  webEngine.getLoadWorker().exceptionProperty().addListener( (ov, t, t1) ->

  {

  System.out.println("Received exception: "+ t1.getMessage());

  });

  webEngine.setOnError( (WebErrorEvent errorEvent) -> {

  System.out.println(errorEvent);

  });

but neither worked. What happens is the page doesn't load and there is no way to know it's due to ill-formed JAvaScript code, let alone having a source line number.

Any suggestions for the error detection& reporting?

Thanks much in advance!

Boris

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Apr 13 2016
Added on Mar 11 2016
1 comment
850 views