Layer7 API Management

 View Only
  • 1.  JS Functions list for the "Execute JavaScript assertion"?

    Posted Jul 09, 2019 02:44 PM
    Does anyone have the list of JS functions which can used in the "Execute JavaScript" assertions?

    ------------------------------
    Regards,
    Yeswin
    ------------------------------


  • 2.  RE: JS Functions list for the "Execute JavaScript assertion"?
    Best Answer

    Posted Jul 16, 2019 10:16 AM
    Hi. Since Gateway 9.4 uses JDK Nashorn engine configured as ECMAScript 5, with Java and extensions disabled.
    It supports most ECMAScript5 built in functions and objects. Follow some documentation:  https://es5.github.io/ 

    While Nashorn runs ECMA-compliant JavaScript, it is important to note that objects normally accessible in a web browser are not available, for example, console, window, and so on. More on Nashorn and how to test it on command line https://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html




    ------------------------------
    Sr. Consultant Services
    HCL Enterprise Studio
    ------------------------------