Jump to content

ldlework

Member
  • Posts

    2
  • Joined

  • Last visited

Posts posted by ldlework

  1. I have a JXA script library with a single function

     

    ```

    function foo(cb) {

      cb("Hello World")
    }
    ```

     

    And I have a JXA script with the following:

    ```
    var mylib = Library("mylib")
    mylib.foo(str => console.log(str))
    ```

    But no matter what I do, I get an error that `cb` is not a function but an object. Other datatypes work but I can't seem to pass functions. Is this a limitation or am I holding it wrong?

×
×
  • Create New...