insertBefore(newChild [, refChild] )
|
|
Parameters
|
ComponentnewChild
The component to insert.
ComponentrefChild
[optional] The reference component. That is, the component before which the new component must be inserted.
|
Returns
|
Component. The component being inserted.
|
Throws
|
WindowException
HIERARCHY_REQUEST_ERR: Raised if the component is of a type that does not allow children of the type of the newChild component, or if the component to insert is one of this component's ancestors.
WRONG_WINDOW_ERR: Raised if newChild was created from a different window than the one that created this component.
NOT_FOUND_ERR: Raised if refChild is not a child of this component.
|