moveTo method

Future<int> moveTo(
  1. int nodeId,
  2. int targetNodeId, {
  3. int? insertBeforeNodeId,
})

Implementation

Future<int> moveTo(int nodeId, int targetNodeId,
    {int? insertBeforeNodeId}) async {
  var params = {'nodeId': nodeId, 'targetNodeId': targetNodeId};

  if (insertBeforeNodeId != null) {
    params['insertBeforeNodeId'] = insertBeforeNodeId;
  }

  var resp = await sendCommand('DOM.moveTo', params: params);
  return resp.result!['nodeId'] as int;
}