Methods
# addChild(el, node)
Create a child node.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
node |
node
|
New node information. |
Example
addChild(E('bd4313fbac40284b'))
# beginEdit(el)
Begin to edit the target node.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
Example
beginEdit(E('bd4313fbac40284b'))
# copyNode(node, to)
Copy node to another node.
Parameters:
Name | Type | Description |
---|---|---|
node |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
to |
TargetElement
|
The target(as parent node) you want to copy to. |
Example
copyNode(E('bd4313fbac402842'),E('bd4313fbac402839'))
# insertBefore(el, node)
Create a sibling node before the selected node.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
node |
node
|
New node information. |
Example
insertBefore(E('bd4313fbac40284b'))
# insertParent(el, node)
Create a parent node of the selected node.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
node |
node
|
New node information. |
Example
insertParent(E('bd4313fbac40284b'))
# insertSibling(el, node)
Create a sibling node.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
node |
node
|
New node information. |
Example
insertSibling(E('bd4313fbac40284b'))
# moveDownNode(el)
Move the target node down.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
Example
moveDownNode(E('bd4313fbac40284b'))
# moveNode(from, to)
Move a node to another node (as child node).
Parameters:
Name | Type | Description |
---|---|---|
from |
TargetElement
|
The target you want to move. |
to |
TargetElement
|
The target(as parent node) you want to move to. |
Example
moveNode(E('bd4313fbac402842'),E('bd4313fbac402839'))
# moveNodeAfter(from, to)
Move a node and become next node of another node.
Parameters:
Name | Type | Description |
---|---|---|
from |
TargetElement
|
|
to |
TargetElement
|
Example
moveNodeAfter(E('bd4313fbac402842'),E('bd4313fbac402839'))
# moveNodeBefore(from, to)
Move a node and become previous node of another node.
Parameters:
Name | Type | Description |
---|---|---|
from |
TargetElement
|
|
to |
TargetElement
|
Example
moveNodeBefore(E('bd4313fbac402842'),E('bd4313fbac402839'))
# moveUpNode(el)
Move the target node up.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
Example
moveUpNode(E('bd4313fbac40284b'))
# removeNode(el)
Remove the target node.
Parameters:
Name | Type | Description |
---|---|---|
el |
TargetElement
|
Target element return by E('...'), default value: currentTarget. |
Example
removeNode(E('bd4313fbac40284b'))