Bridge CC2019 CEP Selection EventHandler
Hey,
I'm currently designing a CEP app, in which I try to update the panel based on the thumb selection.
I tested my script as standalone .jsx and it works fine.
... run function ...
app.eventHandlers.push( {handler: createSelectionHandler ! !} );
}
function createSelectionHandler(event)
{
if ( event.object instanceof Document && event.type === 'selectionsChanged') {
if (app.document.selectionLength > 0)
{
var thumb = app.document.selections[0];
if(thumb.hasMetadata)
{
... does important stuff...
}
}
}
If I run it via the CEP environment - app.eventHandlers doesn't exist (and thus the script silently fails). I can launch the regular ES after startup without issues though.
Is there another way to register an event handler / event listener for a change of the browser selection?
