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


Makes an element either a child or parent of the invoker element.


elementInstance.ApplyElement(element targetElement, string where)


elementtargetElementAn element that to become a parent or child.
stringwhereA string that specifies whether is either child or parent.

Return value

elelmentThe element that became either child or parent.

Sample code


element returnElement = anyElement.ApplyElement(targetElement, "outside");

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

element returnElement = anyElement.ApplyElement(targetElement, "outside");


It's a wrapper of the MSHTML.IHTMLElement2.applyElement(IHTMLElement, String).

If second argument is "outside", the element of the argument becomes a parent of the invoker.

If second argument is "inside", the element of the argument becomes a only child of the invoker. The children of the invoker become to the children of the argument.

If the argument has children, it will be left in its original location.

Links for reference

Copyright © Rice All rights reserved.