General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Use new JavaScript ES6 with XMetaL?

  • jodekirk

    Use new JavaScript ES6 with XMetaL?

    Participants 0
    Replies 1
    Last Activity 7 years, 1 month ago

    Is there a way to use JavaScript ES6 with Polyfills in XMetaL?

    I would like to use Promises in ES6 like in the examples here for cleaner web service code:
    [url=http://www.html5rocks.com/en/tutorials/es6/promises]http://www.html5rocks.com/en/tutorials/es6/promises[/url]

    If we can use real JavaScript instead of JScript I assume we'd have to use the pollyfills to get Promises to work:
    [url=https://github.com/jakearchibald/es6-promise#readme]https://github.com/jakearchibald/es6-promise#readme[/url]

    Reply

    Derek Read

    Reply to: Use new JavaScript ES6 with XMetaL?

    XMetaL Author uses Windows Script Host and supports any scripting engine* that is compatible with WSH.

    If you can find a Windows script engine that supports EcmaScript 6 then it should be possible to use it with any software that supports Windows Script Host (XMetaL Author, IE, MS Office, etc).

    The following scripting languages have script engines compatible with Windows Script Host. There may be more. These are just the ones I am aware of.

    JScript (included with Windows as jscript.dll) — most of our clients use this
    VBScript (included with Windows as vbscript.dll) — many of our clients use this
    Perl (separate install – ActiveState makes one called ActivePerl) — several of our clients use this
    Python (separate install – ActiveState makes one called ActivePython) — I'm not aware of any clients using this but I tried a version years ago

    It may not make sense to try to find a separate script engine however. Microsoft seems to be suggesting they will be updating their scripting system to support EcmaScript 6. I suspect if they do it would be on their newest version of Windows. JScript itself has essentially been Microsoft's extended version of EcmaScript for many years.


    * Microsoft has strict requirements for script engines, so if an engine is written according to those rules it should work, at least in theory.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support