• Loads (parses and executes) the specified JavaScript source code

    Source can be of type:

    • a String: the path of the source file or a URL to execute.
    • java.lang.URL: the URL is queried for the source code to execute if the js.load-from-url option is set to true.
    • java.io.File: the file is read for the source code to execute.
    • a JavaScript object: the object is queried for a name and a script property, which represent the source name and code, respectively.
    • all other types: the source is converted to a String.

    Parameters

    • script: any

    Returns any