CdpJSHandle
Namespace: PuppeteerSharp.Cdp
public class CdpJSHandle : JSHandle, ICdpHandle, IJSHandle, IAsyncDisposableSupports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
Inheritance: object → JSHandle
Implements: ICdpHandle, IJSHandle, IAsyncDisposable
Properties
Section titled “Properties”RemoteObject
Section titled “RemoteObject”public RemoteObject RemoteObject { get; }CDP remote object.
Value: RemoteObject
Methods
Section titled “Methods”DisposeAsync()
Section titled “DisposeAsync()”public override ValueTask DisposeAsync()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Returns: ValueTask — A task that represents the asynchronous dispose operation.
GetPropertiesAsync()
Section titled “GetPropertiesAsync()”public override Task<Dictionary<string, IJSHandle>> GetPropertiesAsync()Returns a Dictionary%602 with property names as keys and IJSHandle instances for the property values.
Returns: Task<Dictionary<string, IJSHandle>> — Task which resolves to a Dictionary%602.
Example
var handle = await page.EvaluateExpressionHandle("({window, document})");var properties = await handle.GetPropertiesAsync();var windowHandle = properties["window"];var documentHandle = properties["document"];await handle.DisposeAsync();JsonValueAsync<T>()
Section titled “JsonValueAsync<T>()”public override Task<T> JsonValueAsync<T>()Returns a JSON representation of the object.
Type parameters
| Name | Description |
|---|---|
T |
A strongly typed object to parse to. |
Returns: Task<T> — Task.
The method will return an empty JSON if the referenced object is not stringifiable. It will throw an error if the object has circular references.
ToString()
Section titled “ToString()”public override string ToString()Returns a string that represents the current object.
Returns: string — A string that represents the current object.
Made with love by Dario Kondratiuk