setAttributesAsText method

Future<void> setAttributesAsText(
  1. NodeId nodeId,
  2. String text, {
  3. String? name,
})

Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs. nodeId Id of the element to set attributes for. text Text with a number of attributes. Will parse this text using HTML parser. name Attribute name to replace with new attributes derived from text in case text parsed successfully.

Implementation

Future<void> setAttributesAsText(NodeId nodeId, String text,
    {String? name}) async {
  await _client.send('DOM.setAttributesAsText', {
    'nodeId': nodeId,
    'text': text,
    if (name != null) 'name': name,
  });
}