2018.2

Table Of Contents
Function Description
"query()" on
page745
Performs a query in the template's contents and creates a new result set
containing the HTML elements that match the given CSS selector.
"resource()" on
page748
This function returns information about an image resource. It can also
be used to check if a file exists.
Examples of iterator functions
Function Description
"each()" on
page726
A generic iterator function, to iterate over the elements in the result set
"for(... in ...)"
on page728
Iterates over the enumerable properties of an object, in arbitrary order. For
each distinct property, statements can be executed.
logger
This is a global ScriptLogger object that allows logging messages such as error, warning or
informational messages. The messages will appear in the Messages pane (see "Preflight
Results and Messages" on page482 and "Designer User Interface" on page390).
Methods
These are the methods of the logger object.
Method Parameters Description
error()
message: string
Logs an error message
info() message: string Logs an informational message
warn() message: string Logs a warning message
record
The record object gives access to the record that is currently being merged with the template.
Page 693