← Back to Runtime domain
Runtime.getProperties
Returns properties of a given object. Object group of the result is inherited from the target
object.
Domain: Runtime
stable
Parameters
| Name | Type | Description |
objectId | RemoteObjectId | Identifier of the object to return properties for. |
ownProperties (optional) | boolean | If true, returns properties belonging only to the element itself, not to its prototype
chain. |
accessorPropertiesOnly (optional) | boolean | If true, returns accessor properties (with getter/setter) only; internal properties are not
returned either. |
generatePreview (optional) | boolean | Whether preview should be generated for the results. |
nonIndexedPropertiesOnly (optional) | boolean | If true, returns non-indexed properties only. |
Returns
| Name | Type | Description |
result | array | Object properties. |
internalProperties | array | Internal object properties (only of the element itself). |
privateProperties | array | Object private properties. |
exceptionDetails | ExceptionDetails | Exception details. |
Example Request
{
"id": 1,
"method": "Runtime.getProperties",
"params": {
"objectId": "{\"injectedScriptId\":1,\"id\":1}"
}
}
Example Response
{
"id": 1,
"result": {
"result": {
"type": "string",
"value": "Example Domain"
},
"internalProperties": [],
"privateProperties": [],
"exceptionDetails": "exceptionDetails-value"
}
}
Usage in Node.js
const result = await send('Runtime.getProperties', {"objectId": "{\"injectedScriptId\":1,\"id\":1}"});
console.log(result);
// {"result": {"type": "string", "value": "Example Domain"}, "internalProperties": [], "privateProperties": [], "exceptionDetails": "exceptionDetails-value"}