Author Topic: JavaScript version and reference for EA 14  (Read 3213 times)

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
JavaScript version and reference for EA 14
« on: June 18, 2020, 01:07:11 am »
I feel like this is a very stupid question but I searched and I searched and I do not find a correct answer.
I write scripts in JavaScript but I do not know which dialect Sparx i(v14) is using in the documentation it refers to Mozilla Spidermonkey however if I use objects described in the reference guide of Spidermonkey I get only errors.
Very concretely I wanted to create a Map to store diagram objects with a key to be able to process them correctly but although
var myArray = new Array();
works fine creating a map with
var myMap = new Map();
throws an exception.
I am trying to guess the syntax that I can use but I would very much be helped if I know which dialect I should use and have a reference for that.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
Does contain all kinds of constructs that will not interpret at all.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8038
  • Karma: +118/-20
    • View Profile
Re: JavaScript version and reference for EA 14
« Reply #1 on: June 18, 2020, 08:14:13 am »
I suspect your problem is that prior to EA 15, the spidermonkey engine hadn't been updated in a very long time. From memory it was on version 1.8.

Arnoud_B

  • EA User
  • **
  • Posts: 76
  • Karma: +0/-0
    • View Profile
Re: JavaScript version and reference for EA 14
« Reply #2 on: June 18, 2020, 04:58:16 pm »
Ok thanks for the response, we are currently upgrading to EA 15 (on a corporate level so it takes a while  :P) so I'll wait for that.