1.7

Table Of Contents
}
}
results.after(wpPost)
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 "Problems and
messages" on page359 and "Designer User Interface" on page273).
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
query()
This function creates a new result set, containing the HTML elements in the current section that
match the supplied CSS selector. The context (optional) allows you to restrict the search to
descendants of one or more context elements.
The new result set is of the type QueryResults, just like the results object which is also the
result of a (hidden) query. All functions that can be used with the results object can also be
used with this result set; see "results" on page486.
query(selector)
Creates a new result set containing the HTML elements in the current section that match the
supplied CSS selector.
selector
Page 481