Change

A tracked change made to a story.

Methods:

accept, addEventListener, getElements, reject, removeEventListener, toSource, toSpecifier

Objects:

Boolean, ChangeTypes, Characters, Date, EventListeners, Events, InsertionPoint, InsertionPoints, Lines, Number, Object, Paragraphs, String, TextColumns, TextStyleRanges, TextVariableInstances, Texts, Words,

Property Listing

Property

Type

Access

Description

changeType

ChangeTypes

ChangeTypes.DELETED_TEXT

ChangeTypes.INSERTED_TEXT

ChangeTypes.MOVED_TEXT

readonly

The type of tracked change. Note: Valid only when track changes is true.

characters

Characters Character

readonly

A collection of characters.

date

Date

readonly

The date on which the tracked change was made. Note: Valid only when track changes is true.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

index

Number

readonly

The index of the Change within its containing object.

insertionPoints

InsertionPoints InsertionPoint

readonly

A collection of insertion points.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

lines

Lines Line

readonly

A collection of lines.

paragraphs

Paragraphs Paragraph

readonly

A collection of paragraphs.

parent

XmlStory

Cell

Story

readonly

The parent of the Change (a Story, XmlStory or Cell).

properties

Object

read/write

A property that allows setting of several properties at the same time.

storyOffset

InsertionPoint

readonly

The location of the first insertion point in the object (relative to the beginning of the story).

textColumns

TextColumns TextColumn

readonly

A collection of text columns.

textStyleRanges

TextStyleRanges TextStyleRange

readonly

A collection of text style ranges.

textVariableInstances

TextVariableInstances TextVariableInstance

readonly

A collection of text variable instances.

texts

Texts Text

readonly

A collection of text objects.

userName

String

readonly

The user who made the change. Note: Valid only when track changes is true.

words

Words Word

readonly

A collection of words.

Method Listing

undefined accept ()

Accepts the tracked change. Note: Valid only when track changes is true.

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

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)

Change getElements ()

Resolves the object specifier, creating an array of object references.

undefined reject ()

Rejects the tracked change. Note: Valid only when track changes is true.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

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

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

Object of

Character.parent

Event.parent

EventListener.parent

InsertionPoint.parent

Line.parent

MutationEvent.parent

Paragraph.parent

Text.parent

TextColumn.parent

TextStyleRange.parent

TextVariableInstance.parent

Word.parent

Return

Change.getElements()

Changes.anyItem()

Changes.everyItem()

Changes.nextItem()

Changes.previousItem()

Changes.item()

Changes.[]()

Changes.itemByRange()

Changes.firstItem()

Changes.lastItem()

Changes.middleItem()