method Session.prototype.on
Overload 1
#Session.prototype.on(event: string,listener: (...args: any[]) => void,): thisOverload 2
#Session.prototype.on(event: "inspectorNotification",listener: (message: InspectorNotification<object>) => void,): thisEmitted when any notification from the V8 Inspector is received.
Parameters #
#event: "inspectorNotification"#listener: (message: InspectorNotification<object>) => voidReturn Type #
thisOverload 3
#Session.prototype.on(event: "Runtime.executionContextCreated",listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void,): thisIssued when new execution context is created.
Parameters #
#event: "Runtime.executionContextCreated"#listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => voidReturn Type #
thisOverload 4
#Session.prototype.on(event: "Runtime.executionContextDestroyed",listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void,): thisIssued when execution context is destroyed.
Parameters #
#event: "Runtime.executionContextDestroyed"#listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => voidReturn Type #
thisOverload 5
#Session.prototype.on(event: "Runtime.executionContextsCleared",listener: () => void,): thisOverload 6
#Session.prototype.on(event: "Runtime.exceptionThrown",listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void,): thisIssued when exception was thrown and unhandled.
Parameters #
#event: "Runtime.exceptionThrown"#listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => voidReturn Type #
thisOverload 7
#Session.prototype.on(event: "Runtime.exceptionRevoked",listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void,): thisIssued when unhandled exception was revoked.
Parameters #
#event: "Runtime.exceptionRevoked"#listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => voidReturn Type #
thisOverload 8
#Session.prototype.on(event: "Runtime.consoleAPICalled",listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void,): thisIssued when console API was called.
Parameters #
#event: "Runtime.consoleAPICalled"#listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => voidReturn Type #
thisOverload 9
#Session.prototype.on(event: "Runtime.inspectRequested",listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void,): thisIssued when object should be inspected (for example, as a result of inspect() command line API call).
Parameters #
#event: "Runtime.inspectRequested"#listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => voidReturn Type #
thisOverload 10
#Session.prototype.on(event: "Debugger.scriptParsed",listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void,): thisFired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
Parameters #
#event: "Debugger.scriptParsed"#listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => voidReturn Type #
thisOverload 11
#Session.prototype.on(event: "Debugger.scriptFailedToParse",listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void,): thisFired when virtual machine fails to parse the script.
Parameters #
#event: "Debugger.scriptFailedToParse"#listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => voidReturn Type #
thisOverload 12
#Session.prototype.on(event: "Debugger.breakpointResolved",listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void,): thisFired when breakpoint is resolved to an actual script and location.
Parameters #
#event: "Debugger.breakpointResolved"#listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => voidReturn Type #
thisOverload 13
#Session.prototype.on(event: "Debugger.paused",listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void,): thisFired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
Parameters #
#event: "Debugger.paused"#listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => voidReturn Type #
thisOverload 14
#Session.prototype.on(event: "Debugger.resumed",listener: () => void,): thisOverload 15
#Session.prototype.on(event: "Console.messageAdded",listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void,): thisIssued when new console message is added.
Parameters #
#event: "Console.messageAdded"#listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => voidReturn Type #
thisOverload 16
#Session.prototype.on(event: "Profiler.consoleProfileStarted",listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void,): thisSent when new profile recording is started using console.profile() call.
Parameters #
#event: "Profiler.consoleProfileStarted"#listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => voidReturn Type #
thisOverload 17
#Session.prototype.on(event: "Profiler.consoleProfileFinished",listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void,): thisParameters #
#event: "Profiler.consoleProfileFinished"#listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => voidReturn Type #
thisOverload 18
#Session.prototype.on(event: "HeapProfiler.addHeapSnapshotChunk",listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void,): thisParameters #
#event: "HeapProfiler.addHeapSnapshotChunk"#listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => voidReturn Type #
thisOverload 19
#Session.prototype.on(event: "HeapProfiler.resetProfiles",listener: () => void,): thisOverload 20
#Session.prototype.on(event: "HeapProfiler.reportHeapSnapshotProgress",listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void,): thisParameters #
#event: "HeapProfiler.reportHeapSnapshotProgress"#listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => voidReturn Type #
thisOverload 21
#Session.prototype.on(event: "HeapProfiler.lastSeenObjectId",listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void,): thisIf heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
Parameters #
#event: "HeapProfiler.lastSeenObjectId"#listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => voidReturn Type #
thisOverload 22
#Session.prototype.on(event: "HeapProfiler.heapStatsUpdate",listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void,): thisIf heap objects tracking has been started then backend may send update for one or more fragments
Parameters #
#event: "HeapProfiler.heapStatsUpdate"#listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => voidReturn Type #
thisOverload 23
#Session.prototype.on(event: "NodeTracing.dataCollected",listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void,): thisContains an bucket of collected trace events.
Parameters #
#event: "NodeTracing.dataCollected"#listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => voidReturn Type #
thisOverload 24
#Session.prototype.on(event: "NodeTracing.tracingComplete",listener: () => void,): thisOverload 25
#Session.prototype.on(event: "NodeWorker.attachedToWorker",listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void,): thisIssued when attached to a worker.
Parameters #
#event: "NodeWorker.attachedToWorker"#listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => voidReturn Type #
thisOverload 26
#Session.prototype.on(event: "NodeWorker.detachedFromWorker",listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void,): thisIssued when detached from the worker.
Parameters #
#event: "NodeWorker.detachedFromWorker"#listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => voidReturn Type #
thisOverload 27
#Session.prototype.on(event: "NodeWorker.receivedMessageFromWorker",listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void,): thisNotifies about a new protocol message received from the session (session ID is provided in attachedToWorker notification).
Parameters #
#event: "NodeWorker.receivedMessageFromWorker"#listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => voidReturn Type #
thisOverload 28
#Session.prototype.on(event: "Network.requestWillBeSent",listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void,): thisFired when page is about to send HTTP request.
Parameters #
#event: "Network.requestWillBeSent"#listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => voidReturn Type #
thisOverload 29
#Session.prototype.on(event: "Network.responseReceived",listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void,): thisFired when HTTP response is available.
Parameters #
#event: "Network.responseReceived"#listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => voidReturn Type #
thisOverload 30
#Session.prototype.on(event: "Network.loadingFailed",listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void,): thisParameters #
#event: "Network.loadingFailed"#listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => voidReturn Type #
thisOverload 31
#Session.prototype.on(event: "Network.loadingFinished",listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void,): thisParameters #
#event: "Network.loadingFinished"#listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => voidReturn Type #
thisOverload 32
#Session.prototype.on(event: "NodeRuntime.waitingForDisconnect",listener: () => void,): thisOverload 33
#Session.prototype.on(event: "NodeRuntime.waitingForDebugger",listener: () => void,): this