2020.2

Table Of Contents
or section selector. For example:
l Selector: body
l Script: results.html('<div
style="background:red;width:1in;height:2in">Hello
World</div>');
In versions prior to 2019.2 the section selector would work on sections as well as Master
Pages. As of version 2019.2 this is no longer the case. The section selector now only
selects sections.
Master Page selector
The Designer writes the name of each Master Page to the masterpage attribute of the <html>
element. This attribute can be used in selectors.
Example
This script adds a box to the body of every Master Page.
l Selector: [masterpage] body
l Script: results.html('<div
style="background:red;width:1in;height:2in">Hello
World</div>');
The following script adds the box only to the Master Page called "Master Page 1".
l Selector: [masterpage="Master page 1"] body
l Script: results.html('<div
style="background:red;width:1in;height:2in">Hello
World</div>');
Sheet position selectors
In Print output, pages have a sheet position that depends on the options set in the "Sheet
Configuration dialog" on page1004 (e.g. the Duplex and Allow Content On options). Connect
gives each page - or rather, the "MediaBox" div element on that page - a class depending on
their sheet position:
Page 877