sendCommand
external fun sendCommand(method: String, commandParams: Any? = definedExternally, sessionId: String = definedExternally): Promise<Any?>(source)
A promise that resolves with the response defined by the 'returns' attribute of the command description in the remote debugging protocol or is rejected indicating the failure of the command.
Send given command to the debugging target.
[!NOTE]
If
sendCommandis called before the target has navigated (e.g. immediately afterattach()), the returned promise may not resolve until navigation occurs.If the command's response has no
resultdata, as defined by that command's entry in the remote debugging protocol, the promise resolves with an empty object ({}), notnullorundefined.