Worker Session
A session created when attaching to a target of type Worker.
The subset of domains available for this target type is not strictly defined by the protocol. The subset provided in this interface is guaranteed to work on this target type. However, some domains might be missing in this interface while being effectively supported by the target. If this is the case, you can use the unsafe function to access all domains.
As a subinterface of WorkerTarget, it inherits the generated domain properties that match the latest Chrome DevToolsProtocol definitions. As such, it is not stable for inheritance, as new properties can be added without major version bump when the protocol changes. It is however safe to use all non-experimental and non-deprecated domains defined here. The experimental and deprecation cycles of the protocol are reflected in this interface with the same guarantees.
Properties
Info about this session and its underlying target.
Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.
The parent browser session that created this target session.
Supports additional targets discovery and allows to attach to them.
Functions
Adapts this ChildSession to a AuctionWorkletSession. If the attached target is not of a compatible type, this function throws an exception.
Adapts this ChildSession to a PageSession. If the attached target is not of a compatible type, this function throws an exception.
Adapts this ChildSession to a ServiceWorkerSession. If the attached target is not of a compatible type, this function throws an exception.
Adapts this ChildSession to a SharedStorageWorkletSession. If the attached target is not of a compatible type, this function throws an exception.
Adapts this ChildSession to a SharedWorkerSession. If the attached target is not of a compatible type, this function throws an exception.
Adapts this ChildSession to a WebContentsSession. If the attached target is not of a compatible type, this function throws an exception.
Adapts this ChildSession to a WorkerSession. If the attached target is not of a compatible type, this function throws an exception.
Adapts this ChildSession to a WorkletSession. If the attached target is not of a compatible type, this function throws an exception.
Closes the underlying web socket connection, effectively closing every session based on the same web socket connection.
Gives access to all domains of the protocol, regardless of the type of this session.