JavaScript version in UltraEdit for Windows version 18.00?

JavaScript version in UltraEdit for Windows version 18.00?

262
MasterMaster
262

    Mar 06, 2012#1

    In the thread Script to find, remove and report repeating words within a line:
    Mofi wrote:However, I found it interesting that there was no error on execution of your script because of function trim(). According to String methods documentation this method of the String object was added with JavaScript 1.8.1 and IDM states in help that JavaScript 1.7 is implemented in UltraEdit. I wrote this little script:

    Code: Select all

    var sResult = "";
    if (typeof(String.trim) != "function") sResult = " not";
    UltraEdit.messageBox("String method trim is" + sResult + " supported.");
    I executed it and got displayed the message: "String method trim is supported." That is very interesting. It looks like IDM has updated to a new version of the JavaScript core without writing it anywhere. The questions are now: In which version was the JavaScript core updated? And which JavaScript version is now working in UltraEdit?
    I had not read that thread until today. I also accidentally wrote some code with the trim() method and forgot to put in the normal prototype addition to the String object and wondered why it worked.

    So have you Mofi or anyone else received any confirmation of the currently undocumented newer version of the JavaScript engine in UE?

    I guess it must be 1.8.1 as reduce()/reduceRight() from version 1.8 and trim()/trimgRight()/trimLeft()/JSON from version 1.8.1 works, and Array.isArray() new to version 1.8.5 does not work (as of UE 18.00.0.1017).

    So IDM just need to document it and add the new methods to the standard JavaScript wordfile (javascript.uew). Has anyone written to them? Otherwise I will do it.

    Maybe a table could be added to the sticky JavaScript tutorial, power tips and more mapping JavaScript versions against UE versions? So scripts suggestions to users in this forum using older versions of UE doesn't include newer JavaScript methods.

    2362
    MasterMaster
    2362

      Mar 06, 2012#2

      jorrasdk wrote:Maybe a table could be added to the sticky JavaScript tutorial, power tips and more mapping JavaScript versions against UE versions? So scripts suggestions to users in this forum using older versions of UE doesn't include newer JavaScript methods.
      I second that motion.

      262
      MasterMaster
      262

        Mar 06, 2012#3

        I have sent IDM an e-mail asking if they will comment on the JavaScript engine version issue? Stay tuned ...

          Mar 06, 2012#4

          Okay, Troy from IDM replied promptly, but were only able to give the answer that the JavaScript engine in UltraEdit for Windows v18.00 is defined as v1.8, not being sure what the exact version number is.

          I'm satisfied with the fact that the String.prototype addition I probably used the most - trim() - now is part of the JavaScript engine in UE 18.00.

          36
          Basic UserBasic User
          36

            Sep 10, 2012#5

            Sorry for digging up a rather old thread (I am not very active here these days ; )

            Anyways, I checked the uejs.dll file in 18.10.0.1016 and it says the version is 1.8.1.1 (fileinfo plugin for Total Commander). It lists the same version for 18.20.0.1014. Seems your assumptions would be correct about the JS version.

            6,680583
            Grand MasterGrand Master
            6,680583

              Sep 10, 2012#6

              I have analyzed all UE/UES versions which I have still archived (which are many) with reference to JavaScript version within uejs.dll and here are the results:

              UE v15.20.0.1022 to UE v18.20.0.1014 and UES v9.30.0.1003 to UES v12.10.0.1003
              JavaScript-C 1.8.0
              pre-release 1 2007-10-03 (uejs.dll has 966.144 bytes, DLL has version 1.8.1.1)

              UE v15.20.0.1020
              JavaScript-C 1.8.0
              pre-release 1 2007-10-03 (uejs.dll has 965.120 bytes, DLL has no version resource)

              UE v13.00 to UE v15.20.0.1017 and UES v6.20 to UES v9.30.0.1002
              JavaScript-C 1.7
              pre-release 2 2006-11-19 (uejs.dll has 684.032 bytes, DLL has no version resource)

              Latest versions on last update of this list were UE v18.20.0.1014 and UES v12.10.0.1003.

              Those version strings found by searching for ASCII string "1.8" in binary uejs.dll are obviously the SpiderMonkey version strings of the JavaScript C/C++ library. Most likely the developers of SpiderMonkey have not kept this version string always up-to-date as comparison with the version in version resource let me suppose.