moveTo method
Moves node into the new container, places it before the given anchor.
nodeId Id of the node to move.
targetNodeId Id of the element to drop the moved node into.
insertBeforeNodeId Drop node before this one (if absent, the moved node becomes the last child of
targetNodeId).
Returns: New id of the moved node.
Implementation
Future<NodeId> moveTo(
NodeId nodeId,
NodeId targetNodeId, {
NodeId? insertBeforeNodeId,
}) async {
var result = await _client.send('DOM.moveTo', {
'nodeId': nodeId,
'targetNodeId': targetNodeId,
if (insertBeforeNodeId != null) 'insertBeforeNodeId': insertBeforeNodeId,
});
return NodeId.fromJson(result['nodeId'] as int);
}