Home Cooker Classes Others Rice CookerGX
Classes  >  element  >  ReplaceChild(element,element)
element class : ReplaceChild(element,element) method

Description

Replaces an existing child element with a new element.

Syntax

elementInstance.ReplaceChild(element targetElement, element replacedElement)

Arguments

ClassNameDescription
elementtargetElementA element that become new child.
elementreplacedElementA child element of the invoker.

Return value

None

Sample code

//anyElement and targetElement are any instance of element type.

//replacedElement is a child of the anyElement.

anyElement.ReplaceChild(targetElement, replacedElement);

Notes

It's a wrapper of the MSHTML.IHTMLDOMNode.replaceChild(IHTMLDOMNode,IHTMLDOMNode).

Second argument need to be a child of the invoker element.

Links for reference

Copyright © Rice All rights reserved.