chromedp/cdp/runtime/events.go

63 lines
2.8 KiB
Go

package runtime
// AUTOGENERATED. DO NOT EDIT.
import (
cdp "github.com/knq/chromedp/cdp"
"github.com/mailru/easyjson"
)
// EventExecutionContextCreated issued when new execution context is created.
type EventExecutionContextCreated struct {
Context *ExecutionContextDescription `json:"context,omitempty"` // A newly created execution context.
}
// EventExecutionContextDestroyed issued when execution context is destroyed.
type EventExecutionContextDestroyed struct {
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Id of the destroyed context
}
// EventExecutionContextsCleared issued when all executionContexts were
// cleared in browser.
type EventExecutionContextsCleared struct{}
// EventExceptionThrown issued when exception was thrown and unhandled.
type EventExceptionThrown struct {
Timestamp cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp of the exception.
ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"`
}
// EventExceptionRevoked issued when unhandled exception was revoked.
type EventExceptionRevoked struct {
Reason string `json:"reason,omitempty"` // Reason describing why exception was revoked.
ExceptionID int64 `json:"exceptionId,omitempty"` // The id of revoked exception, as reported in exceptionUnhandled.
}
// EventConsoleAPICalled issued when console API was called.
type EventConsoleAPICalled struct {
Type APIType `json:"type,omitempty"` // Type of the call.
Args []*RemoteObject `json:"args,omitempty"` // Call arguments.
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where the call was made.
Timestamp cdp.Timestamp `json:"timestamp,omitempty"` // Call timestamp.
StackTrace *StackTrace `json:"stackTrace,omitempty"` // Stack trace captured when the call was made.
Context string `json:"context,omitempty"` // Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
}
// EventInspectRequested issued when object should be inspected (for example,
// as a result of inspect() command line API call).
type EventInspectRequested struct {
Object *RemoteObject `json:"object,omitempty"`
Hints easyjson.RawMessage `json:"hints,omitempty"`
}
// EventTypes all event types in the domain.
var EventTypes = []cdp.MethodType{
cdp.EventRuntimeExecutionContextCreated,
cdp.EventRuntimeExecutionContextDestroyed,
cdp.EventRuntimeExecutionContextsCleared,
cdp.EventRuntimeExceptionThrown,
cdp.EventRuntimeExceptionRevoked,
cdp.EventRuntimeConsoleAPICalled,
cdp.EventRuntimeInspectRequested,
}