Adobe InDesign CS3 (5.0) Object Model JS: EventListeners

InDesign CS3

Class

EventListeners

 A collection of event listeners.

QuickLinks

add, anyItem, count, everyItem, firstItem, item, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

EventListener add (eventType: string, handler: any[, captures: bool=false][, withProperties: Object])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolIf true, the handler is called only in the capturing phase of event propagation. If false, the handler is called in the bubbling phase if the event is an ancestor of the target, or in the at-target phase if the parent of the event listener is itself the target of the event. (Optional) (default: false)
withPropertiesObjectInitial values for properties of the new EventListener (Optional)

EventListener anyItem ()
Returns any EventListener in the collection.

number count ()
Displays the number of elements in the EventListener.

Array of EventListener everyItem ()
Returns every EventListener in the collection.

EventListener firstItem ()
Returns the first EventListener in the collection.

EventListener item (index: any)
Returns the EventListener with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

EventListener itemByName (name: string)
Returns the EventListener with the specified name.

ParameterTypeDescription
namestringThe name.

Array of EventListener itemByRange (from: any, to: any)
Returns the EventListeners within the specified range.

ParameterTypeDescription
fromEventListener
Long Integer
String
The EventListener, index, or name at the beginning of the range. Can accept: EventListener, Long Integer or String.
toEventListener
Long Integer
String
The EventListener, index, or name at the end of the range. Can accept: EventListener, Long Integer or String.

EventListener lastItem ()
Returns the last EventListener in the collection.

EventListener middleItem ()
Returns the middle EventListener in the collection.

EventListener nextItem (obj: EventListener)
Returns the EventListener whose index follows the specified EventListener in the collection.

ParameterTypeDescription
objEventListenerThe EventListener whose index comes before the desired EventListener.

EventListener previousItem (obj: EventListener)
Returns the EventListener with the index previous to the specified index.

ParameterTypeDescription
objEventListenerThe index of the EventListener that follows the desired EventListener.

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

Element of

Application.eventListeners

Document.eventListeners

Menu.eventListeners

MenuAction.eventListeners

ScriptMenuAction.eventListeners

Submenu.eventListeners

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