Pages: 1
Print
Author Topic: New Feature Request: Use modern JavaScript  (Read 128 times)
jodekirk
Member

Posts: 9


« on: May 29, 2019, 08:06:25 AM »

Is there any way to use modern JavaScript with XMetaL Developer for macros? I would like to use the new ES2015 or newer JavaScript syntax and features. Currently I have been using lots of polyfills.

I would like to use the new features such as:
http://es6-features.org/#StringSearching
http://es6-features.org/#StringInterpolation

I keep forgetting old JScript syntax now that I've been using modern JavaScript in other web development projects for over 4 years.

Thanks,
Jeremy Odekirk
« Last Edit: May 29, 2019, 08:43:10 AM by jodekirk » Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2618



WWW
« Reply #1 on: May 29, 2019, 04:27:03 PM »

In theory yes...if you can find and install a JavaScript engine that meets those needs.

Windows includes JScript and VBScript with the Windows Script Host but you can install other script engines. Such an engine would probably need to identify itself using a name other than "JScript" to avoid conflicts with the Windows Script Host version of JScript. The script engine's name is what you insert in a macro inside the MCR file used by XMetaL Author to let it know which script engine to tell Windows Script Host to use to run the script for that particular macro.

Whether such an engine exists for Windows I don't know. It needs to meet these requirements: https://docs.microsoft.com/en-us/scripting/winscript/windows-script-engines

This would be similar to people that install and use the PerlScript (ActivePerl) or PythonScript (ActivePython) engines with XMetaL Author. Most people are using JScript or VBScript as they do not require additional software to be installed, but there are a number of XMetaL Author users that do use these other engines.
Logged
Pages: 1
Print
Jump to:  

email us