How do I trigger an event?

How do I trigger some event that actually does nothing, but has a descriptor._target[0]._ref? Eg. play some fake empty action :thinking:

Why I need this? One of my plugins is based on watching some events and does some stuff based on them. Now I execute batchPlay, but all it triggers, is the historyStateChanged event and that’s it. Maybe I can trigger some custom event, or it’s not supported at all?

What kind of events are you watching?

Currently these events and refs

require('photoshop').action.addNotificationListener([
    {event: 'make'},
    {event: 'move'},
    {event: 'delete'},
    {event: 'close'},
    {event: 'play'}
], (event, descriptor) => {
    if (event === 'close') {
        delete layers[descriptor.documentID];

        return;
    }

    const doc = app.activeDocument;
    const ref = descriptor._target[0]._ref;

    if (!['action', 'layer', 'layerSection', 'adjustmentLayer', 'contentLayer', 'artboardSection'].includes(ref)) {
        return;
    }

    <...>