Adobe InDesign CS6 (8.0) Object Model JS: XMLComment

InDesign CS6

Class

XMLComment

 An XML comment. Base Class: XMLItem

QuickLinks

addEventListener, duplicate, getElements, move, remove, removeEventListener, select, toSource, toSpecifier

Hierarchy

Document | XMLElement
XMLItem
XMLComment
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
idnumber readonlyThe unique ID of the XMLComment.
indexnumber readonlyThe index of the XMLComment within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
parentDocumentXMLElement readonlyThe parent of the XMLComment (a Document or XMLElement).
propertiesObject r/wA property that allows setting of several properties at the same time.
storyOffsetInsertionPoint readonlyThe insertion point before the table in the story containing the table.
valuestring r/wThe text of the XML comment.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

XMLComment duplicate ()
Duplicates the XMLComment.

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

XMLComment move (to: LocationOptions[, reference: varies])
Moves the element to the specified location.

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location in relation to the reference object or within the containing object.
referenceText
XMLItem
The reference object. Note: Required when the to parameter specifies before or after. . Can accept: XMLItem or Text. (Optional)

void remove ()
Deletes the XMLComment.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void select ([existingSelection: SelectionOptions=SelectionOptions.REPLACE_WITH])
Selects the object.

ParameterTypeDescription
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE_WITH
SelectionOptions.SET_KEY
The selection status of the XMLComment in relation to previously selected objects. (Optional) (default: SelectionOptions.REPLACE_WITH)

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

string toSpecifier ()
Retrieves the object specifier.

Used in:

XMLComment XMLComments.nextItem (obj: XMLComment)

XMLComment XMLComments.previousItem (obj: XMLComment)

Return

XMLComment XMLComment.duplicate ()

Array of XMLComment XMLComment.getElements ()

XMLComment XMLComment.move (to: LocationOptions[, reference: varies])

XMLComment XMLComments.[] (index: number)

XMLComment XMLComments.add ([value: string=][, storyOffset: varies][, withProperties: Object])

XMLComment XMLComments.anyItem ()

Array of XMLComment XMLComments.everyItem ()

XMLComment XMLComments.firstItem ()

XMLComment XMLComments.item (index: varies)

XMLComment XMLComments.itemByID (id: number)

Array of XMLComment XMLComments.itemByRange (from: varies, to: varies)

XMLComment XMLComments.lastItem ()

XMLComment XMLComments.middleItem ()

XMLComment XMLComments.nextItem (obj: XMLComment)

XMLComment XMLComments.previousItem (obj: XMLComment)

Jongware, 28-Apr-2012 v3.0.3hContents :: Index