In the thread Script to find, remove and report repeating words within a line:
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.
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.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:
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?Code: Select all
var sResult = ""; if (typeof(String.trim) != "function") sResult = " not"; UltraEdit.messageBox("String method trim is" + sResult + " supported.");
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.