getProperties method
Returns properties of a given object. Object group of the result is inherited from the target object.
objectId: Identifier of the object to return properties for.
ownProperties: If true, returns properties belonging only to the element itself, not to its prototype chain.
Implementation
Future<List<PropertyDescriptor>> getProperties(
RemoteObject object, {
bool? ownProperties,
}) async {
Map<String, dynamic> params = {
'objectId': object.objectId,
};
if (ownProperties != null) {
params['ownProperties'] = ownProperties;
}
final WipResponse response =
await sendCommand('Runtime.getProperties', params: params);
if (response.result!.containsKey('exceptionDetails')) {
throw ExceptionDetails(
response.result!['exceptionDetails'] as Map<String, dynamic>);
} else {
List locations = response.result!['result'];
return List.from(locations.map((map) => PropertyDescriptor(map)));
}
}