2022.1

Table Of Contents
var css = loadtext("css/my-styles.css");
results.append(query("<style type='text/css'>").text(css));
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 page1125 and "Designer User Interface" on page1001).
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
merge
In Control Scripts, the root level instance of the object merge is the entry point from where you
can query and change the way contexts are merged. It gives access to the template with all its
contexts and sections.
For more information about Control Scripts, see "Control Scripts" on page954 and "Control
Script API" on page1466.
Some of the objects are also useful in Post Pagination Scripts; see "Post Pagination Scripts"
on page970 and "Post Pagination Script API" on page1504.
For sample scripts, follow the links to the respective objects.
Field Type Description
channel "Channel" on
page1500
The final output channel: EMAIL, PRINT or WEB. The
channel doesn't change when the output consists of
different contexts. When generating an email, for
example, the channel is EMAIL, even when merging
the Print context to attach it to the email.
Page 1366