Copy link to clipboard
Copied
I am trying to convert a working ESTK script to InDesign UXP one. It should use the menu.
A new menu item can be added without errors.
The error occurs when registering the "beforeDisplay" and "onInvoke" event handlers with the addEventListener method.
Error:
Invalid value for the "handler" parameter of the add method. Expected File or JavaScript Function but got () .
Then I took the BeforeDisplay.jsx file from the latest version of the SDK for testing and renamed it to BeforeDisplay.idjs. The line #targetengine had to be commented.
The error is the same. The event handler could not be registered.
1 Correct answer
UXP scripting is still in development -- the lack of support for event handlers is one of the (still) missing features, apparently, For production scripts you'd better stick with ExtendScript.
Copy link to clipboard
Copied
UXP scripting is still in development -- the lack of support for event handlers is one of the (still) missing features, apparently, For production scripts you'd better stick with ExtendScript.
Copy link to clipboard
Copied
it will be a long time to use ExtendScript...
I already thought that I missed the moment and started looking for
instructions on this topic.

