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.
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.
Copy link to clipboard
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.