← Back to DOM domain

DOM.removeAttribute

Removes attribute with given name from an element with given id.

Domain: DOM stable

Parameters

NameTypeDescription
nodeIdNodeIdId of the element to remove attribute from.
namestringName of the attribute to remove.

Example Request

{
  "id": 1,
  "method": "DOM.removeAttribute",
  "params": {
    "nodeId": 1,
    "name": "example-name"
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('DOM.removeAttribute', {"nodeId": 1, "name": "example-name"});
console.log(result);