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

Description

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

Syntax

elementInstance.ApplyElement(element targetElement, string where)

Arguments

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

Return value

ClassDescription
elelmentThe element that became either child or parent.

Sample code

//anyElementとtargetElementは任意のelement型のインスタンス.

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

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

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

Notes

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.