Required.
Object that becomes the child or parent of the current element.
sWhere
Optional.
String that specifies one of the following values:
outside
Default. Specified element becomes a parent of the current element.
inside
Specified element becomes a child of the current element, but contains all children of the current element.
Return Value
Returns a reference to the applied element.
Remarks
This method is accessible at run time. If elements are removed at run time before the closing tag is parsed, areas of the document might not render.
Calling the applyElement method on an element that has been created with the createElement method, but not yet added to the document tree, will cause the element to lose the contents of its innerHTML property.
Example
This example uses the applyElement method to apply the i element to an unordered list.