148 lines
5.0 KiB
Go
148 lines
5.0 KiB
Go
package page
|
|
|
|
// AUTOGENERATED. DO NOT EDIT.
|
|
|
|
import (
|
|
. "github.com/knq/chromedp/cdp"
|
|
)
|
|
|
|
var (
|
|
_ BackendNode
|
|
_ BackendNodeID
|
|
_ ComputedProperty
|
|
_ ErrorType
|
|
_ Frame
|
|
_ FrameID
|
|
_ LoaderID
|
|
_ Message
|
|
_ MessageError
|
|
_ MethodType
|
|
_ Node
|
|
_ NodeID
|
|
_ NodeType
|
|
_ PseudoType
|
|
_ RGBA
|
|
_ ShadowRootType
|
|
_ Timestamp
|
|
)
|
|
|
|
type EventDomContentEventFired struct {
|
|
Timestamp Timestamp `json:"timestamp,omitempty"`
|
|
}
|
|
|
|
type EventLoadEventFired struct {
|
|
Timestamp Timestamp `json:"timestamp,omitempty"`
|
|
}
|
|
|
|
// EventFrameAttached fired when frame has been attached to its parent.
|
|
type EventFrameAttached struct {
|
|
FrameID FrameID `json:"frameId,omitempty"` // Id of the frame that has been attached.
|
|
ParentFrameID FrameID `json:"parentFrameId,omitempty"` // Parent frame identifier.
|
|
}
|
|
|
|
// EventFrameNavigated fired once navigation of the frame has completed.
|
|
// Frame is now associated with the new loader.
|
|
type EventFrameNavigated struct {
|
|
Frame *Frame `json:"frame,omitempty"` // Frame object.
|
|
}
|
|
|
|
// EventFrameDetached fired when frame has been detached from its parent.
|
|
type EventFrameDetached struct {
|
|
FrameID FrameID `json:"frameId,omitempty"` // Id of the frame that has been detached.
|
|
}
|
|
|
|
// EventFrameStartedLoading fired when frame has started loading.
|
|
type EventFrameStartedLoading struct {
|
|
FrameID FrameID `json:"frameId,omitempty"` // Id of the frame that has started loading.
|
|
}
|
|
|
|
// EventFrameStoppedLoading fired when frame has stopped loading.
|
|
type EventFrameStoppedLoading struct {
|
|
FrameID FrameID `json:"frameId,omitempty"` // Id of the frame that has stopped loading.
|
|
}
|
|
|
|
// EventFrameScheduledNavigation fired when frame schedules a potential
|
|
// navigation.
|
|
type EventFrameScheduledNavigation struct {
|
|
FrameID FrameID `json:"frameId,omitempty"` // Id of the frame that has scheduled a navigation.
|
|
Delay float64 `json:"delay,omitempty"` // Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
|
|
}
|
|
|
|
// EventFrameClearedScheduledNavigation fired when frame no longer has a
|
|
// scheduled navigation.
|
|
type EventFrameClearedScheduledNavigation struct {
|
|
FrameID FrameID `json:"frameId,omitempty"` // Id of the frame that has cleared its scheduled navigation.
|
|
}
|
|
|
|
type EventFrameResized struct{}
|
|
|
|
// EventJavascriptDialogOpening fired when a JavaScript initiated dialog
|
|
// (alert, confirm, prompt, or onbeforeunload) is about to open.
|
|
type EventJavascriptDialogOpening struct {
|
|
Message string `json:"message,omitempty"` // Message that will be displayed by the dialog.
|
|
Type DialogType `json:"type,omitempty"` // Dialog type.
|
|
}
|
|
|
|
// EventJavascriptDialogClosed fired when a JavaScript initiated dialog
|
|
// (alert, confirm, prompt, or onbeforeunload) has been closed.
|
|
type EventJavascriptDialogClosed struct {
|
|
Result bool `json:"result,omitempty"` // Whether dialog was confirmed.
|
|
}
|
|
|
|
// EventScreencastFrame compressed image data requested by the
|
|
// startScreencast.
|
|
type EventScreencastFrame struct {
|
|
Data string `json:"data,omitempty"` // Base64-encoded compressed image.
|
|
Metadata *ScreencastFrameMetadata `json:"metadata,omitempty"` // Screencast frame metadata.
|
|
SessionID int64 `json:"sessionId,omitempty"` // Frame number.
|
|
}
|
|
|
|
// EventScreencastVisibilityChanged fired when the page with currently
|
|
// enabled screencast was shown or hidden .
|
|
type EventScreencastVisibilityChanged struct {
|
|
Visible bool `json:"visible,omitempty"` // True if the page is visible.
|
|
}
|
|
|
|
// EventColorPicked fired when a color has been picked.
|
|
type EventColorPicked struct {
|
|
Color *RGBA `json:"color,omitempty"` // RGBA of the picked color.
|
|
}
|
|
|
|
// EventInterstitialShown fired when interstitial page was shown.
|
|
type EventInterstitialShown struct{}
|
|
|
|
// EventInterstitialHidden fired when interstitial page was hidden.
|
|
type EventInterstitialHidden struct{}
|
|
|
|
// EventNavigationRequested fired when a navigation is started if navigation
|
|
// throttles are enabled. The navigation will be deferred until
|
|
// processNavigation is called.
|
|
type EventNavigationRequested struct {
|
|
IsInMainFrame bool `json:"isInMainFrame,omitempty"` // Whether the navigation is taking place in the main frame or in a subframe.
|
|
IsRedirect bool `json:"isRedirect,omitempty"` // Whether the navigation has encountered a server redirect or not.
|
|
NavigationID int64 `json:"navigationId,omitempty"`
|
|
URL string `json:"url,omitempty"` // URL of requested navigation.
|
|
}
|
|
|
|
// EventTypes is all event types in the domain.
|
|
var EventTypes = []MethodType{
|
|
EventPageDomContentEventFired,
|
|
EventPageLoadEventFired,
|
|
EventPageFrameAttached,
|
|
EventPageFrameNavigated,
|
|
EventPageFrameDetached,
|
|
EventPageFrameStartedLoading,
|
|
EventPageFrameStoppedLoading,
|
|
EventPageFrameScheduledNavigation,
|
|
EventPageFrameClearedScheduledNavigation,
|
|
EventPageFrameResized,
|
|
EventPageJavascriptDialogOpening,
|
|
EventPageJavascriptDialogClosed,
|
|
EventPageScreencastFrame,
|
|
EventPageScreencastVisibilityChanged,
|
|
EventPageColorPicked,
|
|
EventPageInterstitialShown,
|
|
EventPageInterstitialHidden,
|
|
EventPageNavigationRequested,
|
|
}
|