Skip to main content

Home > @jsplumb/test > BrowserUITestSupport > addDiv

BrowserUITestSupport.addDiv() method#

Create a div element and append it either to the jsPlumb container or an element of your choosing.

Signature:

addDiv(id: string, parent?: Element, className?: string, x?: number, y?: number, w?: number, h?: number): Element;

Parameters#

ParameterTypeDescription
idstringUnique ID for the element
parentElementIf null, the new element is appended to the jsPlumb container. Otherwise the new element is appended to this element.
classNamestringOptional class name for the new element
xnumberOptional x position. If this is omitted a random value is chosen.
ynumberOptional y position. If this is omitted a random value is chosen.
wnumberOptional width for the new element.
hnumberOptional height for the new element.

Returns:

Element