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

Description

Swaps the location of two elements in the document hierarchy.

Syntax

elementInstance.Swap(element targetElement)

Arguments

ClassNameDescription
elementtargetElementAn instance of the element type.

Return value

None

Sample code

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

anyElement.Swap(targetElement);

Notes

It's a wrapper of the MSHTML.IHTMLElement.swapNode(IHTMLDOMNode).

If descendants relation exists between the invoker and argument, the exception will throw.

Links for reference

Copyright © Rice All rights reserved.