loadWithNewGlobal should support user supplied arguments from the caller

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b96
    • generic
    • generic
    • Verified

      loadWithNewGlobal API allows a script to be executed in new global scope. But caller script can't pass any argument now. Caller should be able to able to pass one or more arguments to the executed script.

      Example:

      loadWithNewGlobal({
         name: "<code>",

         script:" print(arguments[0]); "+
              " print(arguments[1]); " +
              "print(arguments[2].foo)",
         },
        "hello", 23, { foo: 33}
      );


      Should print:

      hello
      22
      33

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: