EventListeners

A collection of event listeners.

Methods:

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

Property Listing

Property

Type

Access

Description

length

Number

readonly

The number of objects in the collection.

Method Listing

EventListener add (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean], withProperties:Object)

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

withProperties

Object

Initial 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.

EventListener everyItem ()

Returns every EventListener in the collection.

EventListener firstItem ()

Returns the first EventListener in the collection.

EventListener item (index:Varies LongInteger String)

Returns the EventListener with the specified index or name.

Parameter

Type

Description

index

LongInteger

String

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

EventListener itemByName (name:String)

Returns the EventListener with the specified name.

Parameter

Type

Description

name

String

The name.

EventListener itemByRange (from:Varies EventListener LongInteger String, to:Varies EventListener LongInteger String)

Returns the EventListeners within the specified range.

Parameter

Type

Description

from

EventListener

LongInteger

String

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

to

EventListener

LongInteger

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.

Parameter

Type

Description

obj

EventListener

The EventListener whose index comes before the desired EventListener.

EventListener previousItem (obj:EventListener)

Returns the EventListener with the index previous to the specified index.

Parameter

Type

Description

obj

EventListener

The index of the EventListener that follows the desired EventListener.

String toSource ()

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

Object of

Application.eventListeners

Document.eventListeners

MenuAction.eventListeners

ScriptMenuAction.eventListeners

Menu.eventListeners

Submenu.eventListeners