autoAttachRelated

Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through attachedToTarget. The specified target is also auto-attached. This cancels the effect of any previous setAutoAttach and is also cancelled by subsequent setAutoAttach. Only available at the Browser target.

Official doc

Note: this function uses an input class, and constructing this class manually may lead to incompatibilities if the class's constructor arguments change in the future. For maximum compatibility, it is advised to use the overload of this function that directly takes the mandatory parameters as arguments, and the optional ones from a configuration lambda.


inline suspend fun autoAttachRelated(targetId: TargetID, waitForDebuggerOnStart: Boolean, optionalArgs: AutoAttachRelatedRequest.Builder.() -> Unit = {}): AutoAttachRelatedResponse

Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through attachedToTarget. The specified target is also auto-attached. This cancels the effect of any previous setAutoAttach and is also cancelled by subsequent setAutoAttach. Only available at the Browser target.

Official doc

Parameters

targetId

(undocumented in the protocol definition)

waitForDebuggerOnStart

Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.