2017-01-24 15:09:23 +00:00
|
|
|
package page
|
|
|
|
|
2017-07-09 02:05:19 +00:00
|
|
|
// Code generated by chromedp-gen. DO NOT EDIT.
|
2017-01-24 15:09:23 +00:00
|
|
|
|
|
|
|
import (
|
2017-01-26 07:28:34 +00:00
|
|
|
cdp "github.com/knq/chromedp/cdp"
|
2017-03-24 22:51:18 +00:00
|
|
|
"github.com/knq/chromedp/cdp/runtime"
|
2017-01-24 15:09:23 +00:00
|
|
|
)
|
|
|
|
|
2017-01-26 07:28:34 +00:00
|
|
|
// EventDomContentEventFired [no description].
|
2017-01-24 15:09:23 +00:00
|
|
|
type EventDomContentEventFired struct {
|
2017-07-09 01:40:29 +00:00
|
|
|
Timestamp *cdp.MonotonicTime `json:"timestamp"`
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
2017-01-26 07:28:34 +00:00
|
|
|
// EventLoadEventFired [no description].
|
2017-01-24 15:09:23 +00:00
|
|
|
type EventLoadEventFired struct {
|
2017-07-09 01:40:29 +00:00
|
|
|
Timestamp *cdp.MonotonicTime `json:"timestamp"`
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventFrameAttached fired when frame has been attached to its parent.
|
|
|
|
type EventFrameAttached struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been attached.
|
|
|
|
ParentFrameID cdp.FrameID `json:"parentFrameId"` // Parent frame identifier.
|
|
|
|
Stack *runtime.StackTrace `json:"stack,omitempty"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventFrameNavigated fired once navigation of the frame has completed.
|
|
|
|
// Frame is now associated with the new loader.
|
|
|
|
type EventFrameNavigated struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
Frame *cdp.Frame `json:"frame"` // Frame object.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventFrameDetached fired when frame has been detached from its parent.
|
|
|
|
type EventFrameDetached struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been detached.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventFrameStartedLoading fired when frame has started loading.
|
|
|
|
type EventFrameStartedLoading struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has started loading.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventFrameStoppedLoading fired when frame has stopped loading.
|
|
|
|
type EventFrameStoppedLoading struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has stopped loading.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventFrameScheduledNavigation fired when frame schedules a potential
|
|
|
|
// navigation.
|
|
|
|
type EventFrameScheduledNavigation struct {
|
2017-07-31 02:26:12 +00:00
|
|
|
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has scheduled a navigation.
|
|
|
|
Delay float64 `json:"delay"` // Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
|
|
|
|
Reason FrameScheduledNavigationReason `json:"reason"` // The reason for the navigation.
|
|
|
|
URL string `json:"url"` // The destination URL for the scheduled navigation.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventFrameClearedScheduledNavigation fired when frame no longer has a
|
|
|
|
// scheduled navigation.
|
|
|
|
type EventFrameClearedScheduledNavigation struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has cleared its scheduled navigation.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
2017-01-26 07:28:34 +00:00
|
|
|
// EventFrameResized [no description].
|
2017-01-24 15:09:23 +00:00
|
|
|
type EventFrameResized struct{}
|
|
|
|
|
|
|
|
// EventJavascriptDialogOpening fired when a JavaScript initiated dialog
|
|
|
|
// (alert, confirm, prompt, or onbeforeunload) is about to open.
|
|
|
|
type EventJavascriptDialogOpening struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
Message string `json:"message"` // Message that will be displayed by the dialog.
|
|
|
|
Type DialogType `json:"type"` // Dialog type.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventJavascriptDialogClosed fired when a JavaScript initiated dialog
|
|
|
|
// (alert, confirm, prompt, or onbeforeunload) has been closed.
|
|
|
|
type EventJavascriptDialogClosed struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
Result bool `json:"result"` // Whether dialog was confirmed.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventScreencastFrame compressed image data requested by the
|
|
|
|
// startScreencast.
|
|
|
|
type EventScreencastFrame struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
Data string `json:"data"` // Base64-encoded compressed image.
|
|
|
|
Metadata *ScreencastFrameMetadata `json:"metadata"` // Screencast frame metadata.
|
|
|
|
SessionID int64 `json:"sessionId"` // Frame number.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EventScreencastVisibilityChanged fired when the page with currently
|
|
|
|
// enabled screencast was shown or hidden .
|
|
|
|
type EventScreencastVisibilityChanged struct {
|
2017-07-02 11:44:34 +00:00
|
|
|
Visible bool `json:"visible"` // True if the page is visible.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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 {
|
2017-07-02 11:44:34 +00:00
|
|
|
IsInMainFrame bool `json:"isInMainFrame"` // Whether the navigation is taking place in the main frame or in a subframe.
|
|
|
|
IsRedirect bool `json:"isRedirect"` // Whether the navigation has encountered a server redirect or not.
|
|
|
|
NavigationID int64 `json:"navigationId"`
|
|
|
|
URL string `json:"url"` // URL of requested navigation.
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
2017-01-26 07:28:34 +00:00
|
|
|
// EventTypes all event types in the domain.
|
|
|
|
var EventTypes = []cdp.MethodType{
|
|
|
|
cdp.EventPageDomContentEventFired,
|
|
|
|
cdp.EventPageLoadEventFired,
|
|
|
|
cdp.EventPageFrameAttached,
|
|
|
|
cdp.EventPageFrameNavigated,
|
|
|
|
cdp.EventPageFrameDetached,
|
|
|
|
cdp.EventPageFrameStartedLoading,
|
|
|
|
cdp.EventPageFrameStoppedLoading,
|
|
|
|
cdp.EventPageFrameScheduledNavigation,
|
|
|
|
cdp.EventPageFrameClearedScheduledNavigation,
|
|
|
|
cdp.EventPageFrameResized,
|
|
|
|
cdp.EventPageJavascriptDialogOpening,
|
|
|
|
cdp.EventPageJavascriptDialogClosed,
|
|
|
|
cdp.EventPageScreencastFrame,
|
|
|
|
cdp.EventPageScreencastVisibilityChanged,
|
|
|
|
cdp.EventPageInterstitialShown,
|
|
|
|
cdp.EventPageInterstitialHidden,
|
|
|
|
cdp.EventPageNavigationRequested,
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|