2018.1

Table Of Contents
Matched element Matched element after script
execution
<p>ipsumdolor sit amet, consectetur adipiscing
elit.</p>
<span>Lorem Ipsum</span>
<p id="salesrep">Peter Parker</p>
children()
Returns the immediate children (inner HTML) of the elements in a result set.
Examples
This script retrieves the inner HTML of an element selected from a snippet.
var snippet = loadhtml('snippets/snippet.html','#foobar').children
();
results.append(snippet);
The following script retrieves the inner HTML of the elements and then performs a find/replace.
var snippet = loadhtml('snippets/snippet.html','#foobar').children
();
snippet.find('@firstname@').text('foobar');
results.append(snippet);
clone()
This function returns a new set containing a copy of each element in a set; see "Dynamically
adding sections (cloning)" on page355.
To duplicate an existing template element, clone it before calling append(); see "Examples" on
page641.
Note
Calling clone() multiple times before calling addAfter() or addBefore() currently
won't work, as each next clone will get the same default name and replaces the previous clone. To
avoid this you should either explicitly assign a unique name to each clone (i.e. not rely on the
default name), or call addAfter() or addBefore() before calling clone() again.
Page 647