Skip to main content
Vamitul - ks
Inspiring
April 22, 2026
Question

New Event Types in the scripting DOM?

  • April 22, 2026
  • 4 replies
  • 45 views

I'm slowly working on building proper TypeScript definitions for InDesign, and while trawling through the Object Model I noticed InDesign 2026 has two new event types: `BEFORE_SCRIPT_METHOD` and `AFTER_SCRIPT_METHOD`.

Can anyone shed some light on them?

    4 replies

    rob day
    Community Expert
    Community Expert
    April 22, 2026

    Sorry, I’m actually using ID 2025, which is probably the reason for the error—although the indesignjs.de API is not including it in their reference.

     

    I can only guess that calling a public function would trigger my scriptMethod() event function?

    rob day
    Community Expert
    Community Expert
    April 22, 2026

    If I try to ad an afterScriptMethod listener, Visual Studio Code throws a not a recognized event type error:

     

    #targetengine "session";

    app.addEventListener("afterScriptMethod", scriptMethod);

    function scriptMethod(e) {
    alert("Event Object is: " + e.parent.constructor.name)
    };

     

     

     

    Vamitul - ks
    Inspiring
    April 22, 2026

    Hi ​@rob day 

    It's both UXP and ExtendScript, I found them diffing the OMV XMLs. It looks to be new in 21.3 (lovely when the DOM changes between major releases, no?)

     

    Krommatine Systems: InDesign plugins, tools, and automations.
    rob day
    Community Expert
    Community Expert
    April 22, 2026

    Hi ​@Vamitul - ks , Could you clarify if this for ExendScript or UXP? I’m not seeing it in the ExtendScript Event lists