Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions lib/PuppeteerSharp/JSHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@ public virtual Task<IJSHandle> GetPropertyAsync(string propertyName)
public virtual async Task<Dictionary<string, IJSHandle>> GetPropertiesAsync()
{
var propertyNames = await EvaluateFunctionAsync<string[]>(@"object => {
const enumerableProperties = [];
const descriptors = Object.getOwnPropertyDescriptors(object);
for (const propertyName in descriptors) {
if (descriptors[propertyName]?.enumerable)
{
enumerableProperties.push(propertyName);
}
}
return enumerableProperties;
return Object.keys(object ?? {});
}").ConfigureAwait(false);

var dic = new Dictionary<string, IJSHandle>();
Expand Down
Loading