Adobe InDesign CS4 (6.0) Object Model JS: EventListener

InDesign CS4

Class

EventListener

 An event listener.

QuickLinks

getElements, remove, toSource, toSpecifier

Hierarchy

Application | Document | Menu | MenuAction | ScriptMenuAction | Submenu
EventListener

Properties

PropertyTypeAccessDescription
capturesbool readonlyIf true, the event supports the capturing phase of propagation.
eventTypestring readonlyThe name of the event.
handlerFileJavaScript Function readonlyThe handler to invoke when the event occurs. Can return: File or JavaScript Function.
idnumber readonlyThe unique ID of the EventListener.
indexnumber readonlyThe index of the EventListener within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
parentApplication
Document
Menu
MenuAction
ScriptMenuAction
Submenu
readonlyThe parent of the EventListener (a Document, Application, MenuAction, ScriptMenuAction, Menu or Submenu).
propertiesObject r/wA property that allows setting of several properties at the same time.

Methods

Instances

Array of EventListener getElements ()
Resolves the object specifier, creating an array of object references.

void remove ()
Deletes the EventListener.

string toSource ()
Generates a string which, if executed, will return the EventListener.

string toSpecifier ()
Retrieves the object specifier.

Used in:

array of EventListener EventListeners.itemByRange (from: any, to: any)

EventListener EventListeners.nextItem (obj: EventListener)

EventListener EventListeners.previousItem (obj: EventListener)

Return

EventListener Application.addEventListener (eventType: string, handler: any[, captures: bool=false])

EventListener Document.addEventListener (eventType: string, handler: any[, captures: bool=false])

Array of EventListener EventListener.getElements ()

EventListener EventListeners.[] (index: number)

EventListener EventListeners.add (eventType: string, handler: any[, captures: bool=false][, withProperties: Object])

EventListener EventListeners.anyItem ()

Array of EventListener EventListeners.everyItem ()

EventListener EventListeners.firstItem ()

EventListener EventListeners.item (index: any)

EventListener EventListeners.itemByID (id: number)

EventListener EventListeners.itemByName (name: string)

Array of EventListener EventListeners.itemByRange (from: any, to: any)

EventListener EventListeners.lastItem ()

EventListener EventListeners.middleItem ()

EventListener EventListeners.nextItem (obj: EventListener)

EventListener EventListeners.previousItem (obj: EventListener)

EventListener Menu.addEventListener (eventType: string, handler: any[, captures: bool=false])

EventListener MenuAction.addEventListener (eventType: string, handler: any[, captures: bool=false])

EventListener ScriptMenuAction.addEventListener (eventType: string, handler: any[, captures: bool=false])

EventListener Submenu.addEventListener (eventType: string, handler: any[, captures: bool=false])

Jongware, 20-Jun-2010 v3.0.3dContents :: Index