diff --git a/cdp/browser/browser.go b/cdp/browser/browser.go
index 3b4dd90..6a3b371 100644
--- a/cdp/browser/browser.go
+++ b/cdp/browser/browser.go
@@ -15,6 +15,20 @@ import (
"github.com/knq/chromedp/cdp/target"
)
+// CloseParams close browser gracefully.
+type CloseParams struct{}
+
+// Close close browser gracefully.
+func Close() *CloseParams {
+ return &CloseParams{}
+}
+
+// Do executes Browser.close against the provided context and
+// target handler.
+func (p *CloseParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
+ return h.Execute(ctxt, cdp.CommandBrowserClose, nil, nil)
+}
+
// GetWindowForTargetParams get the browser window that contains the devtools
// target.
type GetWindowForTargetParams struct {
diff --git a/cdp/browser/easyjson.go b/cdp/browser/easyjson.go
index 1de3633..8ac4678 100644
--- a/cdp/browser/easyjson.go
+++ b/cdp/browser/easyjson.go
@@ -579,7 +579,66 @@ func (v *GetVersionParams) UnmarshalJSON(data []byte) error {
func (v *GetVersionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser6(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(in *jlexer.Lexer, out *Bounds) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(in *jlexer.Lexer, out *CloseParams) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(out *jwriter.Writer, in CloseParams) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v CloseParams) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *CloseParams) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser8(in *jlexer.Lexer, out *Bounds) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -618,7 +677,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(in *jlexer.Lexer, out
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(out *jwriter.Writer, in Bounds) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser8(out *jwriter.Writer, in Bounds) {
out.RawByte('{')
first := true
_ = first
@@ -668,23 +727,23 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(out *jwriter.Writer,
// MarshalJSON supports json.Marshaler interface
func (v Bounds) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser8(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Bounds) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser8(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Bounds) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser8(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Bounds) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser8(l, v)
}
diff --git a/cdp/cdp.go b/cdp/cdp.go
index 7243efb..0d73784 100644
--- a/cdp/cdp.go
+++ b/cdp/cdp.go
@@ -78,6 +78,7 @@ const (
EventPageScreencastVisibilityChanged MethodType = "Page.screencastVisibilityChanged"
EventPageInterstitialShown MethodType = "Page.interstitialShown"
EventPageInterstitialHidden MethodType = "Page.interstitialHidden"
+ EventPageWindowOpen MethodType = "Page.windowOpen"
CommandPageEnable MethodType = "Page.enable"
CommandPageDisable MethodType = "Page.disable"
CommandPageAddScriptToEvaluateOnNewDocument MethodType = "Page.addScriptToEvaluateOnNewDocument"
@@ -332,6 +333,11 @@ const (
CommandTargetDisposeBrowserContext MethodType = "Target.disposeBrowserContext"
CommandTargetCreateTarget MethodType = "Target.createTarget"
CommandTargetGetTargets MethodType = "Target.getTargets"
+ EventHeadlessExperimentalNeedsBeginFramesChanged MethodType = "HeadlessExperimental.needsBeginFramesChanged"
+ EventHeadlessExperimentalMainFrameReadyForScreenshots MethodType = "HeadlessExperimental.mainFrameReadyForScreenshots"
+ CommandHeadlessExperimentalEnable MethodType = "HeadlessExperimental.enable"
+ CommandHeadlessExperimentalDisable MethodType = "HeadlessExperimental.disable"
+ CommandHeadlessExperimentalBeginFrame MethodType = "HeadlessExperimental.beginFrame"
EventServiceWorkerWorkerRegistrationUpdated MethodType = "ServiceWorker.workerRegistrationUpdated"
EventServiceWorkerWorkerVersionUpdated MethodType = "ServiceWorker.workerVersionUpdated"
EventServiceWorkerWorkerErrorReported MethodType = "ServiceWorker.workerErrorReported"
@@ -410,6 +416,7 @@ const (
EventTetheringAccepted MethodType = "Tethering.accepted"
CommandTetheringBind MethodType = "Tethering.bind"
CommandTetheringUnbind MethodType = "Tethering.unbind"
+ CommandBrowserClose MethodType = "Browser.close"
CommandBrowserGetWindowForTarget MethodType = "Browser.getWindowForTarget"
CommandBrowserGetVersion MethodType = "Browser.getVersion"
CommandBrowserSetWindowBounds MethodType = "Browser.setWindowBounds"
@@ -569,6 +576,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = EventPageInterstitialShown
case EventPageInterstitialHidden:
*t = EventPageInterstitialHidden
+ case EventPageWindowOpen:
+ *t = EventPageWindowOpen
case CommandPageEnable:
*t = CommandPageEnable
case CommandPageDisable:
@@ -1077,6 +1086,16 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = CommandTargetCreateTarget
case CommandTargetGetTargets:
*t = CommandTargetGetTargets
+ case EventHeadlessExperimentalNeedsBeginFramesChanged:
+ *t = EventHeadlessExperimentalNeedsBeginFramesChanged
+ case EventHeadlessExperimentalMainFrameReadyForScreenshots:
+ *t = EventHeadlessExperimentalMainFrameReadyForScreenshots
+ case CommandHeadlessExperimentalEnable:
+ *t = CommandHeadlessExperimentalEnable
+ case CommandHeadlessExperimentalDisable:
+ *t = CommandHeadlessExperimentalDisable
+ case CommandHeadlessExperimentalBeginFrame:
+ *t = CommandHeadlessExperimentalBeginFrame
case EventServiceWorkerWorkerRegistrationUpdated:
*t = EventServiceWorkerWorkerRegistrationUpdated
case EventServiceWorkerWorkerVersionUpdated:
@@ -1233,6 +1252,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = CommandTetheringBind
case CommandTetheringUnbind:
*t = CommandTetheringUnbind
+ case CommandBrowserClose:
+ *t = CommandBrowserClose
case CommandBrowserGetWindowForTarget:
*t = CommandBrowserGetWindowForTarget
case CommandBrowserGetVersion:
diff --git a/cdp/cdputil/cdputil.go b/cdp/cdputil/cdputil.go
index f9b1328..c328232 100644
--- a/cdp/cdputil/cdputil.go
+++ b/cdp/cdputil/cdputil.go
@@ -20,6 +20,7 @@ import (
"github.com/knq/chromedp/cdp/domsnapshot"
"github.com/knq/chromedp/cdp/domstorage"
"github.com/knq/chromedp/cdp/emulation"
+ "github.com/knq/chromedp/cdp/headlessexperimental"
"github.com/knq/chromedp/cdp/heapprofiler"
"github.com/knq/chromedp/cdp/indexeddb"
"github.com/knq/chromedp/cdp/inspector"
@@ -220,6 +221,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.EventPageInterstitialHidden:
v = new(page.EventInterstitialHidden)
+ case cdp.EventPageWindowOpen:
+ v = new(page.EventWindowOpen)
+
case cdp.CommandOverlayEnable:
return emptyVal, nil
@@ -901,6 +905,21 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.EventTargetReceivedMessageFromTarget:
v = new(target.EventReceivedMessageFromTarget)
+ case cdp.CommandHeadlessExperimentalEnable:
+ return emptyVal, nil
+
+ case cdp.CommandHeadlessExperimentalDisable:
+ return emptyVal, nil
+
+ case cdp.CommandHeadlessExperimentalBeginFrame:
+ v = new(headlessexperimental.BeginFrameReturns)
+
+ case cdp.EventHeadlessExperimentalNeedsBeginFramesChanged:
+ v = new(headlessexperimental.EventNeedsBeginFramesChanged)
+
+ case cdp.EventHeadlessExperimentalMainFrameReadyForScreenshots:
+ v = new(headlessexperimental.EventMainFrameReadyForScreenshots)
+
case cdp.CommandServiceWorkerEnable:
return emptyVal, nil
@@ -1135,6 +1154,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.EventTetheringAccepted:
v = new(tethering.EventAccepted)
+ case cdp.CommandBrowserClose:
+ return emptyVal, nil
+
case cdp.CommandBrowserGetWindowForTarget:
v = new(browser.GetWindowForTargetReturns)
diff --git a/cdp/debugger/debugger.go b/cdp/debugger/debugger.go
index 339f47a..08f8f22 100644
--- a/cdp/debugger/debugger.go
+++ b/cdp/debugger/debugger.go
@@ -103,6 +103,7 @@ type SetBreakpointByURLParams struct {
LineNumber int64 `json:"lineNumber"` // Line number to set breakpoint at.
URL string `json:"url,omitempty"` // URL of the resources to set breakpoint on.
URLRegex string `json:"urlRegex,omitempty"` // Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.
+ ScriptHash string `json:"scriptHash,omitempty"` // Script hash of the resources to set breakpoint on.
ColumnNumber int64 `json:"columnNumber,omitempty"` // Offset in the line to set breakpoint at.
Condition string `json:"condition,omitempty"` // Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
}
@@ -134,6 +135,12 @@ func (p SetBreakpointByURLParams) WithURLRegex(urlRegex string) *SetBreakpointBy
return &p
}
+// WithScriptHash script hash of the resources to set breakpoint on.
+func (p SetBreakpointByURLParams) WithScriptHash(scriptHash string) *SetBreakpointByURLParams {
+ p.ScriptHash = scriptHash
+ return &p
+}
+
// WithColumnNumber offset in the line to set breakpoint at.
func (p SetBreakpointByURLParams) WithColumnNumber(columnNumber int64) *SetBreakpointByURLParams {
p.ColumnNumber = columnNumber
diff --git a/cdp/debugger/easyjson.go b/cdp/debugger/easyjson.go
index 3291159..0a86e62 100644
--- a/cdp/debugger/easyjson.go
+++ b/cdp/debugger/easyjson.go
@@ -1079,6 +1079,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger12(in *jlexer.Lexer, o
out.URL = string(in.String())
case "urlRegex":
out.URLRegex = string(in.String())
+ case "scriptHash":
+ out.ScriptHash = string(in.String())
case "columnNumber":
out.ColumnNumber = int64(in.Int64())
case "condition":
@@ -1119,6 +1121,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger12(out *jwriter.Writer
out.RawString("\"urlRegex\":")
out.String(string(in.URLRegex))
}
+ if in.ScriptHash != "" {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"scriptHash\":")
+ out.String(string(in.ScriptHash))
+ }
if in.ColumnNumber != 0 {
if !first {
out.RawByte(',')
diff --git a/cdp/emulation/easyjson.go b/cdp/emulation/easyjson.go
index 58e3aa2..ae49d7a 100644
--- a/cdp/emulation/easyjson.go
+++ b/cdp/emulation/easyjson.go
@@ -5,6 +5,7 @@ package emulation
import (
json "encoding/json"
cdp "github.com/knq/chromedp/cdp"
+ page "github.com/knq/chromedp/cdp/page"
easyjson "github.com/mailru/easyjson"
jlexer "github.com/mailru/easyjson/jlexer"
jwriter "github.com/mailru/easyjson/jwriter"
@@ -655,6 +656,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation8(in *jlexer.Lexer, o
}
(*out.ScreenOrientation).UnmarshalEasyJSON(in)
}
+ case "viewport":
+ if in.IsNull() {
+ in.Skip()
+ out.Viewport = nil
+ } else {
+ if out.Viewport == nil {
+ out.Viewport = new(page.Viewport)
+ }
+ (*out.Viewport).UnmarshalEasyJSON(in)
+ }
default:
in.SkipRecursive()
}
@@ -753,6 +764,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation8(out *jwriter.Writer
(*in.ScreenOrientation).MarshalEasyJSON(out)
}
}
+ if in.Viewport != nil {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"viewport\":")
+ if in.Viewport == nil {
+ out.RawString("null")
+ } else {
+ (*in.Viewport).MarshalEasyJSON(out)
+ }
+ }
out.RawByte('}')
}
diff --git a/cdp/emulation/emulation.go b/cdp/emulation/emulation.go
index f26bf07..87555f5 100644
--- a/cdp/emulation/emulation.go
+++ b/cdp/emulation/emulation.go
@@ -12,6 +12,7 @@ import (
"context"
cdp "github.com/knq/chromedp/cdp"
+ "github.com/knq/chromedp/cdp/page"
)
// SetDeviceMetricsOverrideParams overrides the values of device screen
@@ -30,6 +31,7 @@ type SetDeviceMetricsOverrideParams struct {
PositionY int64 `json:"positionY,omitempty"` // Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
DontSetVisibleSize bool `json:"dontSetVisibleSize,omitempty"` // Do not set visible view size, rely upon explicit setVisibleSize call.
ScreenOrientation *ScreenOrientation `json:"screenOrientation,omitempty"` // Screen orientation override.
+ Viewport *page.Viewport `json:"viewport,omitempty"` // If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
}
// SetDeviceMetricsOverride overrides the values of device screen dimensions
@@ -98,6 +100,14 @@ func (p SetDeviceMetricsOverrideParams) WithScreenOrientation(screenOrientation
return &p
}
+// WithViewport if set, the visible area of the page will be overridden to
+// this viewport. This viewport change is not observed by the page, e.g.
+// viewport-relative elements do not change positions.
+func (p SetDeviceMetricsOverrideParams) WithViewport(viewport *page.Viewport) *SetDeviceMetricsOverrideParams {
+ p.Viewport = viewport
+ return &p
+}
+
// Do executes Emulation.setDeviceMetricsOverride against the provided context and
// target handler.
func (p *SetDeviceMetricsOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
diff --git a/cdp/headlessexperimental/easyjson.go b/cdp/headlessexperimental/easyjson.go
new file mode 100644
index 0000000..5ccf4b4
--- /dev/null
+++ b/cdp/headlessexperimental/easyjson.go
@@ -0,0 +1,557 @@
+// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
+
+package headlessexperimental
+
+import (
+ json "encoding/json"
+ runtime "github.com/knq/chromedp/cdp/runtime"
+ easyjson "github.com/mailru/easyjson"
+ jlexer "github.com/mailru/easyjson/jlexer"
+ jwriter "github.com/mailru/easyjson/jwriter"
+)
+
+// suppress unused package warning
+var (
+ _ *json.RawMessage
+ _ *jlexer.Lexer
+ _ *jwriter.Writer
+ _ easyjson.Marshaler
+)
+
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental(in *jlexer.Lexer, out *ScreenshotParams) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "format":
+ (out.Format).UnmarshalEasyJSON(in)
+ case "quality":
+ out.Quality = int64(in.Int64())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental(out *jwriter.Writer, in ScreenshotParams) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.Format != "" {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"format\":")
+ (in.Format).MarshalEasyJSON(out)
+ }
+ if in.Quality != 0 {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"quality\":")
+ out.Int64(int64(in.Quality))
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v ScreenshotParams) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v ScreenshotParams) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *ScreenshotParams) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *ScreenshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental1(in *jlexer.Lexer, out *EventNeedsBeginFramesChanged) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "needsBeginFrames":
+ out.NeedsBeginFrames = bool(in.Bool())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental1(out *jwriter.Writer, in EventNeedsBeginFramesChanged) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"needsBeginFrames\":")
+ out.Bool(bool(in.NeedsBeginFrames))
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v EventNeedsBeginFramesChanged) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental1(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v EventNeedsBeginFramesChanged) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental1(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *EventNeedsBeginFramesChanged) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental1(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *EventNeedsBeginFramesChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental1(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental2(in *jlexer.Lexer, out *EventMainFrameReadyForScreenshots) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental2(out *jwriter.Writer, in EventMainFrameReadyForScreenshots) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v EventMainFrameReadyForScreenshots) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental2(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v EventMainFrameReadyForScreenshots) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental2(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *EventMainFrameReadyForScreenshots) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental2(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *EventMainFrameReadyForScreenshots) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental2(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental3(in *jlexer.Lexer, out *EnableParams) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental3(out *jwriter.Writer, in EnableParams) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v EnableParams) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental3(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental3(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *EnableParams) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental3(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental3(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental4(in *jlexer.Lexer, out *DisableParams) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental4(out *jwriter.Writer, in DisableParams) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v DisableParams) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental4(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental4(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *DisableParams) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental4(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental4(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental5(in *jlexer.Lexer, out *BeginFrameReturns) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "hasDamage":
+ out.HasDamage = bool(in.Bool())
+ case "screenshotData":
+ out.ScreenshotData = string(in.String())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental5(out *jwriter.Writer, in BeginFrameReturns) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.HasDamage {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"hasDamage\":")
+ out.Bool(bool(in.HasDamage))
+ }
+ if in.ScreenshotData != "" {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"screenshotData\":")
+ out.String(string(in.ScreenshotData))
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v BeginFrameReturns) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental5(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v BeginFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental5(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *BeginFrameReturns) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental5(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *BeginFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental5(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental6(in *jlexer.Lexer, out *BeginFrameParams) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "frameTime":
+ if in.IsNull() {
+ in.Skip()
+ out.FrameTime = nil
+ } else {
+ if out.FrameTime == nil {
+ out.FrameTime = new(runtime.Timestamp)
+ }
+ (*out.FrameTime).UnmarshalEasyJSON(in)
+ }
+ case "deadline":
+ if in.IsNull() {
+ in.Skip()
+ out.Deadline = nil
+ } else {
+ if out.Deadline == nil {
+ out.Deadline = new(runtime.Timestamp)
+ }
+ (*out.Deadline).UnmarshalEasyJSON(in)
+ }
+ case "interval":
+ out.Interval = float64(in.Float64())
+ case "screenshot":
+ if in.IsNull() {
+ in.Skip()
+ out.Screenshot = nil
+ } else {
+ if out.Screenshot == nil {
+ out.Screenshot = new(ScreenshotParams)
+ }
+ (*out.Screenshot).UnmarshalEasyJSON(in)
+ }
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental6(out *jwriter.Writer, in BeginFrameParams) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if in.FrameTime != nil {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"frameTime\":")
+ if in.FrameTime == nil {
+ out.RawString("null")
+ } else {
+ (*in.FrameTime).MarshalEasyJSON(out)
+ }
+ }
+ if in.Deadline != nil {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"deadline\":")
+ if in.Deadline == nil {
+ out.RawString("null")
+ } else {
+ (*in.Deadline).MarshalEasyJSON(out)
+ }
+ }
+ if in.Interval != 0 {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"interval\":")
+ out.Float64(float64(in.Interval))
+ }
+ if in.Screenshot != nil {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"screenshot\":")
+ if in.Screenshot == nil {
+ out.RawString("null")
+ } else {
+ (*in.Screenshot).MarshalEasyJSON(out)
+ }
+ }
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v BeginFrameParams) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental6(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v BeginFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeadlessexperimental6(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *BeginFrameParams) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental6(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *BeginFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeadlessexperimental6(l, v)
+}
diff --git a/cdp/headlessexperimental/events.go b/cdp/headlessexperimental/events.go
new file mode 100644
index 0000000..02a46dd
--- /dev/null
+++ b/cdp/headlessexperimental/events.go
@@ -0,0 +1,24 @@
+package headlessexperimental
+
+// Code generated by chromedp-gen. DO NOT EDIT.
+
+import (
+ cdp "github.com/knq/chromedp/cdp"
+)
+
+// EventNeedsBeginFramesChanged issued when the target starts or stops
+// needing BeginFrames.
+type EventNeedsBeginFramesChanged struct {
+ NeedsBeginFrames bool `json:"needsBeginFrames"` // True if BeginFrames are needed, false otherwise.
+}
+
+// EventMainFrameReadyForScreenshots issued when the main frame has first
+// submitted a frame to the browser. May only be fired while a BeginFrame is in
+// flight. Before this event, screenshotting requests may fail.
+type EventMainFrameReadyForScreenshots struct{}
+
+// EventTypes all event types in the domain.
+var EventTypes = []cdp.MethodType{
+ cdp.EventHeadlessExperimentalNeedsBeginFramesChanged,
+ cdp.EventHeadlessExperimentalMainFrameReadyForScreenshots,
+}
diff --git a/cdp/headlessexperimental/headlessexperimental.go b/cdp/headlessexperimental/headlessexperimental.go
new file mode 100644
index 0000000..ec40fe4
--- /dev/null
+++ b/cdp/headlessexperimental/headlessexperimental.go
@@ -0,0 +1,123 @@
+// Package headlessexperimental provides the Chrome Debugging Protocol
+// commands, types, and events for the HeadlessExperimental domain.
+//
+// This domain provides experimental commands only supported in headless
+// mode.
+//
+// Generated by the chromedp-gen command.
+package headlessexperimental
+
+// Code generated by chromedp-gen. DO NOT EDIT.
+
+import (
+ "context"
+ "encoding/base64"
+
+ cdp "github.com/knq/chromedp/cdp"
+ "github.com/knq/chromedp/cdp/runtime"
+)
+
+// EnableParams enables headless events for the target.
+type EnableParams struct{}
+
+// Enable enables headless events for the target.
+func Enable() *EnableParams {
+ return &EnableParams{}
+}
+
+// Do executes HeadlessExperimental.enable against the provided context and
+// target handler.
+func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
+ return h.Execute(ctxt, cdp.CommandHeadlessExperimentalEnable, nil, nil)
+}
+
+// DisableParams disables headless events for the target.
+type DisableParams struct{}
+
+// Disable disables headless events for the target.
+func Disable() *DisableParams {
+ return &DisableParams{}
+}
+
+// Do executes HeadlessExperimental.disable against the provided context and
+// target handler.
+func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
+ return h.Execute(ctxt, cdp.CommandHeadlessExperimentalDisable, nil, nil)
+}
+
+// BeginFrameParams sends a BeginFrame to the target and returns when the
+// frame was completed. Optionally captures a screenshot from the resulting
+// frame. Requires that the target was created with enabled BeginFrameControl.
+type BeginFrameParams struct {
+ FrameTime *runtime.Timestamp `json:"frameTime,omitempty"` // Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used.
+ Deadline *runtime.Timestamp `json:"deadline,omitempty"` // Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval.
+ Interval float64 `json:"interval,omitempty"` // The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
+ Screenshot *ScreenshotParams `json:"screenshot,omitempty"` // If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured.
+}
+
+// BeginFrame sends a BeginFrame to the target and returns when the frame was
+// completed. Optionally captures a screenshot from the resulting frame.
+// Requires that the target was created with enabled BeginFrameControl.
+//
+// parameters:
+func BeginFrame() *BeginFrameParams {
+ return &BeginFrameParams{}
+}
+
+// WithFrameTime timestamp of this BeginFrame (milliseconds since epoch). If
+// not set, the current time will be used.
+func (p BeginFrameParams) WithFrameTime(frameTime *runtime.Timestamp) *BeginFrameParams {
+ p.FrameTime = frameTime
+ return &p
+}
+
+// WithDeadline deadline of this BeginFrame (milliseconds since epoch). If
+// not set, the deadline will be calculated from the frameTime and interval.
+func (p BeginFrameParams) WithDeadline(deadline *runtime.Timestamp) *BeginFrameParams {
+ p.Deadline = deadline
+ return &p
+}
+
+// WithInterval the interval between BeginFrames that is reported to the
+// compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e.
+// about 16.666 milliseconds.
+func (p BeginFrameParams) WithInterval(interval float64) *BeginFrameParams {
+ p.Interval = interval
+ return &p
+}
+
+// WithScreenshot if set, a screenshot of the frame will be captured and
+// returned in the response. Otherwise, no screenshot will be captured.
+func (p BeginFrameParams) WithScreenshot(screenshot *ScreenshotParams) *BeginFrameParams {
+ p.Screenshot = screenshot
+ return &p
+}
+
+// BeginFrameReturns return values.
+type BeginFrameReturns struct {
+ HasDamage bool `json:"hasDamage,omitempty"` // Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display.
+ ScreenshotData string `json:"screenshotData,omitempty"` // Base64-encoded image data of the screenshot, if one was requested and successfully taken.
+}
+
+// Do executes HeadlessExperimental.beginFrame against the provided context and
+// target handler.
+//
+// returns:
+// hasDamage - Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display.
+// screenshotData - Base64-encoded image data of the screenshot, if one was requested and successfully taken.
+func (p *BeginFrameParams) Do(ctxt context.Context, h cdp.Handler) (hasDamage bool, screenshotData []byte, err error) {
+ // execute
+ var res BeginFrameReturns
+ err = h.Execute(ctxt, cdp.CommandHeadlessExperimentalBeginFrame, p, &res)
+ if err != nil {
+ return false, nil, err
+ }
+
+ // decode
+ var dec []byte
+ dec, err = base64.StdEncoding.DecodeString(res.ScreenshotData)
+ if err != nil {
+ return false, nil, err
+ }
+ return res.HasDamage, dec, nil
+}
diff --git a/cdp/headlessexperimental/types.go b/cdp/headlessexperimental/types.go
new file mode 100644
index 0000000..1d0f3ec
--- /dev/null
+++ b/cdp/headlessexperimental/types.go
@@ -0,0 +1,59 @@
+package headlessexperimental
+
+import (
+ "errors"
+
+ "github.com/mailru/easyjson"
+ "github.com/mailru/easyjson/jlexer"
+ "github.com/mailru/easyjson/jwriter"
+)
+
+// Code generated by chromedp-gen. DO NOT EDIT.
+
+// ScreenshotParams encoding options for a screenshot.
+type ScreenshotParams struct {
+ Format ScreenshotParamsFormat `json:"format,omitempty"` // Image compression format (defaults to png).
+ Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
+}
+
+// ScreenshotParamsFormat image compression format (defaults to png).
+type ScreenshotParamsFormat string
+
+// String returns the ScreenshotParamsFormat as string value.
+func (t ScreenshotParamsFormat) String() string {
+ return string(t)
+}
+
+// ScreenshotParamsFormat values.
+const (
+ ScreenshotParamsFormatJpeg ScreenshotParamsFormat = "jpeg"
+ ScreenshotParamsFormatPng ScreenshotParamsFormat = "png"
+)
+
+// MarshalEasyJSON satisfies easyjson.Marshaler.
+func (t ScreenshotParamsFormat) MarshalEasyJSON(out *jwriter.Writer) {
+ out.String(string(t))
+}
+
+// MarshalJSON satisfies json.Marshaler.
+func (t ScreenshotParamsFormat) MarshalJSON() ([]byte, error) {
+ return easyjson.Marshal(t)
+}
+
+// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
+func (t *ScreenshotParamsFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
+ switch ScreenshotParamsFormat(in.String()) {
+ case ScreenshotParamsFormatJpeg:
+ *t = ScreenshotParamsFormatJpeg
+ case ScreenshotParamsFormatPng:
+ *t = ScreenshotParamsFormatPng
+
+ default:
+ in.AddError(errors.New("unknown ScreenshotParamsFormat value"))
+ }
+}
+
+// UnmarshalJSON satisfies json.Unmarshaler.
+func (t *ScreenshotParamsFormat) UnmarshalJSON(buf []byte) error {
+ return easyjson.Unmarshal(buf, t)
+}
diff --git a/cdp/network/easyjson.go b/cdp/network/easyjson.go
index 3f984b6..c71a5c1 100644
--- a/cdp/network/easyjson.go
+++ b/cdp/network/easyjson.go
@@ -5,6 +5,7 @@ package network
import (
json "encoding/json"
cdp "github.com/knq/chromedp/cdp"
+ page "github.com/knq/chromedp/cdp/page"
runtime "github.com/knq/chromedp/cdp/runtime"
security "github.com/knq/chromedp/cdp/security"
easyjson "github.com/mailru/easyjson"
@@ -664,6 +665,29 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork5(in *jlexer.Lexer, out
}
in.Delim(']')
}
+ case "resourceTypes":
+ if in.IsNull() {
+ in.Skip()
+ out.ResourceTypes = nil
+ } else {
+ in.Delim('[')
+ if out.ResourceTypes == nil {
+ if !in.IsDelim(']') {
+ out.ResourceTypes = make([]page.ResourceType, 0, 4)
+ } else {
+ out.ResourceTypes = []page.ResourceType{}
+ }
+ } else {
+ out.ResourceTypes = (out.ResourceTypes)[:0]
+ }
+ for !in.IsDelim(']') {
+ var v8 page.ResourceType
+ (v8).UnmarshalEasyJSON(in)
+ out.ResourceTypes = append(out.ResourceTypes, v8)
+ in.WantComma()
+ }
+ in.Delim(']')
+ }
default:
in.SkipRecursive()
}
@@ -694,11 +718,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork5(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v8, v9 := range in.Patterns {
- if v8 > 0 {
+ for v9, v10 := range in.Patterns {
+ if v9 > 0 {
out.RawByte(',')
}
- out.String(string(v9))
+ out.String(string(v10))
+ }
+ out.RawByte(']')
+ }
+ }
+ if len(in.ResourceTypes) != 0 {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"resourceTypes\":")
+ if in.ResourceTypes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
+ out.RawString("null")
+ } else {
+ out.RawByte('[')
+ for v11, v12 := range in.ResourceTypes {
+ if v11 > 0 {
+ out.RawByte(',')
+ }
+ (v12).MarshalEasyJSON(out)
}
out.RawByte(']')
}
@@ -761,15 +804,15 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(in *jlexer.Lexer, out
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
- var v10 interface{}
- if m, ok := v10.(easyjson.Unmarshaler); ok {
+ var v13 interface{}
+ if m, ok := v13.(easyjson.Unmarshaler); ok {
m.UnmarshalEasyJSON(in)
- } else if m, ok := v10.(json.Unmarshaler); ok {
+ } else if m, ok := v13.(json.Unmarshaler); ok {
_ = m.UnmarshalJSON(in.Raw())
} else {
- v10 = in.Interface()
+ v13 = in.Interface()
}
- (out.Headers)[key] = v10
+ (out.Headers)[key] = v13
in.WantComma()
}
in.Delim('}')
@@ -797,20 +840,20 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(out *jwriter.Writer,
out.RawString(`null`)
} else {
out.RawByte('{')
- v11First := true
- for v11Name, v11Value := range in.Headers {
- if !v11First {
+ v14First := true
+ for v14Name, v14Value := range in.Headers {
+ if !v14First {
out.RawByte(',')
}
- v11First = false
- out.String(string(v11Name))
+ v14First = false
+ out.String(string(v14Name))
out.RawByte(':')
- if m, ok := v11Value.(easyjson.Marshaler); ok {
+ if m, ok := v14Value.(easyjson.Marshaler); ok {
m.MarshalEasyJSON(out)
- } else if m, ok := v11Value.(json.Marshaler); ok {
+ } else if m, ok := v14Value.(json.Marshaler); ok {
out.Raw(m.MarshalJSON())
} else {
- out.Raw(json.Marshal(v11Value))
+ out.Raw(json.Marshal(v14Value))
}
}
out.RawByte('}')
@@ -951,17 +994,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(in *jlexer.Lexer, out
out.Cookies = (out.Cookies)[:0]
}
for !in.IsDelim(']') {
- var v12 *CookieParam
+ var v15 *CookieParam
if in.IsNull() {
in.Skip()
- v12 = nil
+ v15 = nil
} else {
- if v12 == nil {
- v12 = new(CookieParam)
+ if v15 == nil {
+ v15 = new(CookieParam)
}
- (*v12).UnmarshalEasyJSON(in)
+ (*v15).UnmarshalEasyJSON(in)
}
- out.Cookies = append(out.Cookies, v12)
+ out.Cookies = append(out.Cookies, v15)
in.WantComma()
}
in.Delim(']')
@@ -989,14 +1032,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v13, v14 := range in.Cookies {
- if v13 > 0 {
+ for v16, v17 := range in.Cookies {
+ if v16 > 0 {
out.RawByte(',')
}
- if v14 == nil {
+ if v17 == nil {
out.RawString("null")
} else {
- (*v14).MarshalEasyJSON(out)
+ (*v17).MarshalEasyJSON(out)
}
}
out.RawByte(']')
@@ -1422,9 +1465,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(in *jlexer.Lexer, ou
out.Urls = (out.Urls)[:0]
}
for !in.IsDelim(']') {
- var v15 string
- v15 = string(in.String())
- out.Urls = append(out.Urls, v15)
+ var v18 string
+ v18 = string(in.String())
+ out.Urls = append(out.Urls, v18)
in.WantComma()
}
in.Delim(']')
@@ -1452,11 +1495,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v16, v17 := range in.Urls {
- if v16 > 0 {
+ for v19, v20 := range in.Urls {
+ if v19 > 0 {
out.RawByte(',')
}
- out.String(string(v17))
+ out.String(string(v20))
}
out.RawByte(']')
}
@@ -1535,9 +1578,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, ou
out.SanList = (out.SanList)[:0]
}
for !in.IsDelim(']') {
- var v18 string
- v18 = string(in.String())
- out.SanList = append(out.SanList, v18)
+ var v21 string
+ v21 = string(in.String())
+ out.SanList = append(out.SanList, v21)
in.WantComma()
}
in.Delim(']')
@@ -1580,17 +1623,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, ou
out.SignedCertificateTimestampList = (out.SignedCertificateTimestampList)[:0]
}
for !in.IsDelim(']') {
- var v19 *SignedCertificateTimestamp
+ var v22 *SignedCertificateTimestamp
if in.IsNull() {
in.Skip()
- v19 = nil
+ v22 = nil
} else {
- if v19 == nil {
- v19 = new(SignedCertificateTimestamp)
+ if v22 == nil {
+ v22 = new(SignedCertificateTimestamp)
}
- (*v19).UnmarshalEasyJSON(in)
+ (*v22).UnmarshalEasyJSON(in)
}
- out.SignedCertificateTimestampList = append(out.SignedCertificateTimestampList, v19)
+ out.SignedCertificateTimestampList = append(out.SignedCertificateTimestampList, v22)
in.WantComma()
}
in.Delim(']')
@@ -1664,11 +1707,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v20, v21 := range in.SanList {
- if v20 > 0 {
+ for v23, v24 := range in.SanList {
+ if v23 > 0 {
out.RawByte(',')
}
- out.String(string(v21))
+ out.String(string(v24))
}
out.RawByte(']')
}
@@ -1707,14 +1750,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v22, v23 := range in.SignedCertificateTimestampList {
- if v22 > 0 {
+ for v25, v26 := range in.SignedCertificateTimestampList {
+ if v25 > 0 {
out.RawByte(',')
}
- if v23 == nil {
+ if v26 == nil {
out.RawString("null")
} else {
- (*v23).MarshalEasyJSON(out)
+ (*v26).MarshalEasyJSON(out)
}
}
out.RawByte(']')
@@ -1783,15 +1826,15 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(in *jlexer.Lexer, ou
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
- var v24 interface{}
- if m, ok := v24.(easyjson.Unmarshaler); ok {
+ var v27 interface{}
+ if m, ok := v27.(easyjson.Unmarshaler); ok {
m.UnmarshalEasyJSON(in)
- } else if m, ok := v24.(json.Unmarshaler); ok {
+ } else if m, ok := v27.(json.Unmarshaler); ok {
_ = m.UnmarshalJSON(in.Raw())
} else {
- v24 = in.Interface()
+ v27 = in.Interface()
}
- (out.Headers)[key] = v24
+ (out.Headers)[key] = v27
in.WantComma()
}
in.Delim('}')
@@ -1813,15 +1856,15 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(in *jlexer.Lexer, ou
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
- var v25 interface{}
- if m, ok := v25.(easyjson.Unmarshaler); ok {
+ var v28 interface{}
+ if m, ok := v28.(easyjson.Unmarshaler); ok {
m.UnmarshalEasyJSON(in)
- } else if m, ok := v25.(json.Unmarshaler); ok {
+ } else if m, ok := v28.(json.Unmarshaler); ok {
_ = m.UnmarshalJSON(in.Raw())
} else {
- v25 = in.Interface()
+ v28 = in.Interface()
}
- (out.RequestHeaders)[key] = v25
+ (out.RequestHeaders)[key] = v28
in.WantComma()
}
in.Delim('}')
@@ -1907,20 +1950,20 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(out *jwriter.Writer,
out.RawString(`null`)
} else {
out.RawByte('{')
- v26First := true
- for v26Name, v26Value := range in.Headers {
- if !v26First {
+ v29First := true
+ for v29Name, v29Value := range in.Headers {
+ if !v29First {
out.RawByte(',')
}
- v26First = false
- out.String(string(v26Name))
+ v29First = false
+ out.String(string(v29Name))
out.RawByte(':')
- if m, ok := v26Value.(easyjson.Marshaler); ok {
+ if m, ok := v29Value.(easyjson.Marshaler); ok {
m.MarshalEasyJSON(out)
- } else if m, ok := v26Value.(json.Marshaler); ok {
+ } else if m, ok := v29Value.(json.Marshaler); ok {
out.Raw(m.MarshalJSON())
} else {
- out.Raw(json.Marshal(v26Value))
+ out.Raw(json.Marshal(v29Value))
}
}
out.RawByte('}')
@@ -1949,20 +1992,20 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(out *jwriter.Writer,
out.RawString(`null`)
} else {
out.RawByte('{')
- v27First := true
- for v27Name, v27Value := range in.RequestHeaders {
- if !v27First {
+ v30First := true
+ for v30Name, v30Value := range in.RequestHeaders {
+ if !v30First {
out.RawByte(',')
}
- v27First = false
- out.String(string(v27Name))
+ v30First = false
+ out.String(string(v30Name))
out.RawByte(':')
- if m, ok := v27Value.(easyjson.Marshaler); ok {
+ if m, ok := v30Value.(easyjson.Marshaler); ok {
m.MarshalEasyJSON(out)
- } else if m, ok := v27Value.(json.Marshaler); ok {
+ } else if m, ok := v30Value.(json.Marshaler); ok {
out.Raw(m.MarshalJSON())
} else {
- out.Raw(json.Marshal(v27Value))
+ out.Raw(json.Marshal(v30Value))
}
}
out.RawByte('}')
@@ -2313,15 +2356,15 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(in *jlexer.Lexer, ou
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
- var v28 interface{}
- if m, ok := v28.(easyjson.Unmarshaler); ok {
+ var v31 interface{}
+ if m, ok := v31.(easyjson.Unmarshaler); ok {
m.UnmarshalEasyJSON(in)
- } else if m, ok := v28.(json.Unmarshaler); ok {
+ } else if m, ok := v31.(json.Unmarshaler); ok {
_ = m.UnmarshalJSON(in.Raw())
} else {
- v28 = in.Interface()
+ v31 = in.Interface()
}
- (out.Headers)[key] = v28
+ (out.Headers)[key] = v31
in.WantComma()
}
in.Delim('}')
@@ -2371,20 +2414,20 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(out *jwriter.Writer,
out.RawString(`null`)
} else {
out.RawByte('{')
- v29First := true
- for v29Name, v29Value := range in.Headers {
- if !v29First {
+ v32First := true
+ for v32Name, v32Value := range in.Headers {
+ if !v32First {
out.RawByte(',')
}
- v29First = false
- out.String(string(v29Name))
+ v32First = false
+ out.String(string(v32Name))
out.RawByte(':')
- if m, ok := v29Value.(easyjson.Marshaler); ok {
+ if m, ok := v32Value.(easyjson.Marshaler); ok {
m.MarshalEasyJSON(out)
- } else if m, ok := v29Value.(json.Marshaler); ok {
+ } else if m, ok := v32Value.(json.Marshaler); ok {
out.Raw(m.MarshalJSON())
} else {
- out.Raw(json.Marshal(v29Value))
+ out.Raw(json.Marshal(v32Value))
}
}
out.RawByte('}')
@@ -2808,17 +2851,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(in *jlexer.Lexer, ou
out.Cookies = (out.Cookies)[:0]
}
for !in.IsDelim(']') {
- var v30 *Cookie
+ var v33 *Cookie
if in.IsNull() {
in.Skip()
- v30 = nil
+ v33 = nil
} else {
- if v30 == nil {
- v30 = new(Cookie)
+ if v33 == nil {
+ v33 = new(Cookie)
}
- (*v30).UnmarshalEasyJSON(in)
+ (*v33).UnmarshalEasyJSON(in)
}
- out.Cookies = append(out.Cookies, v30)
+ out.Cookies = append(out.Cookies, v33)
in.WantComma()
}
in.Delim(']')
@@ -2847,14 +2890,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v31, v32 := range in.Cookies {
- if v31 > 0 {
+ for v34, v35 := range in.Cookies {
+ if v34 > 0 {
out.RawByte(',')
}
- if v32 == nil {
+ if v35 == nil {
out.RawString("null")
} else {
- (*v32).MarshalEasyJSON(out)
+ (*v35).MarshalEasyJSON(out)
}
}
out.RawByte(']')
@@ -2921,9 +2964,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(in *jlexer.Lexer, ou
out.Urls = (out.Urls)[:0]
}
for !in.IsDelim(']') {
- var v33 string
- v33 = string(in.String())
- out.Urls = append(out.Urls, v33)
+ var v36 string
+ v36 = string(in.String())
+ out.Urls = append(out.Urls, v36)
in.WantComma()
}
in.Delim(']')
@@ -2952,11 +2995,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v34, v35 := range in.Urls {
- if v34 > 0 {
+ for v37, v38 := range in.Urls {
+ if v37 > 0 {
out.RawByte(',')
}
- out.String(string(v35))
+ out.String(string(v38))
}
out.RawByte(']')
}
@@ -3022,9 +3065,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(in *jlexer.Lexer, ou
out.TableNames = (out.TableNames)[:0]
}
for !in.IsDelim(']') {
- var v36 string
- v36 = string(in.String())
- out.TableNames = append(out.TableNames, v36)
+ var v39 string
+ v39 = string(in.String())
+ out.TableNames = append(out.TableNames, v39)
in.WantComma()
}
in.Delim(']')
@@ -3053,11 +3096,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v37, v38 := range in.TableNames {
- if v37 > 0 {
+ for v40, v41 := range in.TableNames {
+ if v40 > 0 {
out.RawByte(',')
}
- out.String(string(v38))
+ out.String(string(v41))
}
out.RawByte(']')
}
@@ -3190,17 +3233,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(in *jlexer.Lexer, ou
out.Cookies = (out.Cookies)[:0]
}
for !in.IsDelim(']') {
- var v39 *Cookie
+ var v42 *Cookie
if in.IsNull() {
in.Skip()
- v39 = nil
+ v42 = nil
} else {
- if v39 == nil {
- v39 = new(Cookie)
+ if v42 == nil {
+ v42 = new(Cookie)
}
- (*v39).UnmarshalEasyJSON(in)
+ (*v42).UnmarshalEasyJSON(in)
}
- out.Cookies = append(out.Cookies, v39)
+ out.Cookies = append(out.Cookies, v42)
in.WantComma()
}
in.Delim(']')
@@ -3229,14 +3272,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(out *jwriter.Writer,
out.RawString("null")
} else {
out.RawByte('[')
- for v40, v41 := range in.Cookies {
- if v40 > 0 {
+ for v43, v44 := range in.Cookies {
+ if v43 > 0 {
out.RawByte(',')
}
- if v41 == nil {
+ if v44 == nil {
out.RawString("null")
} else {
- (*v41).MarshalEasyJSON(out)
+ (*v44).MarshalEasyJSON(out)
}
}
out.RawByte(']')
@@ -4602,15 +4645,15 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(in *jlexer.Lexer, ou
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
- var v42 interface{}
- if m, ok := v42.(easyjson.Unmarshaler); ok {
+ var v45 interface{}
+ if m, ok := v45.(easyjson.Unmarshaler); ok {
m.UnmarshalEasyJSON(in)
- } else if m, ok := v42.(json.Unmarshaler); ok {
+ } else if m, ok := v45.(json.Unmarshaler); ok {
_ = m.UnmarshalJSON(in.Raw())
} else {
- v42 = in.Interface()
+ v45 = in.Interface()
}
- (out.RedirectHeaders)[key] = v42
+ (out.RedirectHeaders)[key] = v45
in.WantComma()
}
in.Delim('}')
@@ -4681,20 +4724,20 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(out *jwriter.Writer,
out.RawString(`null`)
} else {
out.RawByte('{')
- v43First := true
- for v43Name, v43Value := range in.RedirectHeaders {
- if !v43First {
+ v46First := true
+ for v46Name, v46Value := range in.RedirectHeaders {
+ if !v46First {
out.RawByte(',')
}
- v43First = false
- out.String(string(v43Name))
+ v46First = false
+ out.String(string(v46Name))
out.RawByte(':')
- if m, ok := v43Value.(easyjson.Marshaler); ok {
+ if m, ok := v46Value.(easyjson.Marshaler); ok {
m.MarshalEasyJSON(out)
- } else if m, ok := v43Value.(json.Marshaler); ok {
+ } else if m, ok := v46Value.(json.Marshaler); ok {
out.Raw(m.MarshalJSON())
} else {
- out.Raw(json.Marshal(v43Value))
+ out.Raw(json.Marshal(v46Value))
}
}
out.RawByte('}')
@@ -5864,15 +5907,15 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(in *jlexer.Lexer, ou
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
- var v44 interface{}
- if m, ok := v44.(easyjson.Unmarshaler); ok {
+ var v47 interface{}
+ if m, ok := v47.(easyjson.Unmarshaler); ok {
m.UnmarshalEasyJSON(in)
- } else if m, ok := v44.(json.Unmarshaler); ok {
+ } else if m, ok := v47.(json.Unmarshaler); ok {
_ = m.UnmarshalJSON(in.Raw())
} else {
- v44 = in.Interface()
+ v47 = in.Interface()
}
- (out.Headers)[key] = v44
+ (out.Headers)[key] = v47
in.WantComma()
}
in.Delim('}')
@@ -5957,20 +6000,20 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(out *jwriter.Writer,
out.RawString(`null`)
} else {
out.RawByte('{')
- v45First := true
- for v45Name, v45Value := range in.Headers {
- if !v45First {
+ v48First := true
+ for v48Name, v48Value := range in.Headers {
+ if !v48First {
out.RawByte(',')
}
- v45First = false
- out.String(string(v45Name))
+ v48First = false
+ out.String(string(v48Name))
out.RawByte(':')
- if m, ok := v45Value.(easyjson.Marshaler); ok {
+ if m, ok := v48Value.(easyjson.Marshaler); ok {
m.MarshalEasyJSON(out)
- } else if m, ok := v45Value.(json.Marshaler); ok {
+ } else if m, ok := v48Value.(json.Marshaler); ok {
out.Raw(m.MarshalJSON())
} else {
- out.Raw(json.Marshal(v45Value))
+ out.Raw(json.Marshal(v48Value))
}
}
out.RawByte('}')
diff --git a/cdp/network/network.go b/cdp/network/network.go
index 2f4998d..9eb0d54 100644
--- a/cdp/network/network.go
+++ b/cdp/network/network.go
@@ -15,6 +15,7 @@ import (
"encoding/base64"
cdp "github.com/knq/chromedp/cdp"
+ "github.com/knq/chromedp/cdp/page"
)
// EnableParams enables network tracking, network events will now be
@@ -703,14 +704,15 @@ func (p *GetCertificateParams) Do(ctxt context.Context, h cdp.Handler) (tableNam
}
// SetRequestInterceptionEnabledParams sets the requests to intercept that
-// match a the provided patterns.
+// match a the provided patterns and optionally resource types.
type SetRequestInterceptionEnabledParams struct {
- Enabled bool `json:"enabled"` // Whether requests should be intercepted. If patterns is not set, matches all and resets any previously set patterns. Other parameters are ignored if false.
- Patterns []string `json:"patterns,omitempty"` // URLs matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call. Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. If omitted equivalent to ['*'] (intercept all).
+ Enabled bool `json:"enabled"` // Whether requests should be intercepted. If patterns is not set, matches all and resets any previously set patterns. Other parameters are ignored if false.
+ Patterns []string `json:"patterns,omitempty"` // URLs matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call. Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. If omitted equivalent to ['*'] (intercept all).
+ ResourceTypes []page.ResourceType `json:"resourceTypes,omitempty"` // If set, only requests for matching resource types will be intercepted.
}
// SetRequestInterceptionEnabled sets the requests to intercept that match a
-// the provided patterns.
+// the provided patterns and optionally resource types.
//
// parameters:
// enabled - Whether requests should be intercepted. If patterns is not set, matches all and resets any previously set patterns. Other parameters are ignored if false.
@@ -729,6 +731,13 @@ func (p SetRequestInterceptionEnabledParams) WithPatterns(patterns []string) *Se
return &p
}
+// WithResourceTypes if set, only requests for matching resource types will
+// be intercepted.
+func (p SetRequestInterceptionEnabledParams) WithResourceTypes(resourceTypes []page.ResourceType) *SetRequestInterceptionEnabledParams {
+ p.ResourceTypes = resourceTypes
+ return &p
+}
+
// Do executes Network.setRequestInterceptionEnabled against the provided context and
// target handler.
func (p *SetRequestInterceptionEnabledParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
diff --git a/cdp/page/easyjson.go b/cdp/page/easyjson.go
index ea94855..5c627b0 100644
--- a/cdp/page/easyjson.go
+++ b/cdp/page/easyjson.go
@@ -3275,7 +3275,98 @@ func (v *FrameResource) UnmarshalJSON(data []byte) error {
func (v *FrameResource) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(in *jlexer.Lexer, out *EventScreencastVisibilityChanged) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(in *jlexer.Lexer, out *EventWindowOpen) {
+ isTopLevel := in.IsStart()
+ if in.IsNull() {
+ if isTopLevel {
+ in.Consumed()
+ }
+ in.Skip()
+ return
+ }
+ in.Delim('{')
+ for !in.IsDelim('}') {
+ key := in.UnsafeString()
+ in.WantColon()
+ if in.IsNull() {
+ in.Skip()
+ in.WantComma()
+ continue
+ }
+ switch key {
+ case "url":
+ out.URL = string(in.String())
+ case "windowName":
+ out.WindowName = string(in.String())
+ case "windowFeatures":
+ out.WindowFeatures = string(in.String())
+ case "userGesture":
+ out.UserGesture = bool(in.Bool())
+ default:
+ in.SkipRecursive()
+ }
+ in.WantComma()
+ }
+ in.Delim('}')
+ if isTopLevel {
+ in.Consumed()
+ }
+}
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in EventWindowOpen) {
+ out.RawByte('{')
+ first := true
+ _ = first
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"url\":")
+ out.String(string(in.URL))
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"windowName\":")
+ out.String(string(in.WindowName))
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"windowFeatures\":")
+ out.String(string(in.WindowFeatures))
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"userGesture\":")
+ out.Bool(bool(in.UserGesture))
+ out.RawByte('}')
+}
+
+// MarshalJSON supports json.Marshaler interface
+func (v EventWindowOpen) MarshalJSON() ([]byte, error) {
+ w := jwriter.Writer{}
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(&w, v)
+ return w.Buffer.BuildBytes(), w.Error
+}
+
+// MarshalEasyJSON supports easyjson.Marshaler interface
+func (v EventWindowOpen) MarshalEasyJSON(w *jwriter.Writer) {
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(w, v)
+}
+
+// UnmarshalJSON supports json.Unmarshaler interface
+func (v *EventWindowOpen) UnmarshalJSON(data []byte) error {
+ r := jlexer.Lexer{Data: data}
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(&r, v)
+ return r.Error()
+}
+
+// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
+func (v *EventWindowOpen) UnmarshalEasyJSON(l *jlexer.Lexer) {
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(l, v)
+}
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(in *jlexer.Lexer, out *EventScreencastVisibilityChanged) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3306,7 +3397,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in EventScreencastVisibilityChanged) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(out *jwriter.Writer, in EventScreencastVisibilityChanged) {
out.RawByte('{')
first := true
_ = first
@@ -3322,27 +3413,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventScreencastVisibilityChanged) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventScreencastVisibilityChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventScreencastVisibilityChanged) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventScreencastVisibilityChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(in *jlexer.Lexer, out *EventScreencastFrame) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(in *jlexer.Lexer, out *EventScreencastFrame) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3385,7 +3476,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(out *jwriter.Writer, in EventScreencastFrame) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in EventScreencastFrame) {
out.RawByte('{')
first := true
_ = first
@@ -3417,27 +3508,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventScreencastFrame) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventScreencastFrame) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventScreencastFrame) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventScreencastFrame) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(in *jlexer.Lexer, out *EventLoadEventFired) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(in *jlexer.Lexer, out *EventLoadEventFired) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3476,7 +3567,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in EventLoadEventFired) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in EventLoadEventFired) {
out.RawByte('{')
first := true
_ = first
@@ -3496,27 +3587,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventLoadEventFired) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventLoadEventFired) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventLoadEventFired) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventLoadEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(in *jlexer.Lexer, out *EventLifecycleEvent) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(in *jlexer.Lexer, out *EventLifecycleEvent) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3535,6 +3626,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(in *jlexer.Lexer, out *
continue
}
switch key {
+ case "frameId":
+ (out.FrameID).UnmarshalEasyJSON(in)
case "name":
out.Name = string(in.String())
case "timestamp":
@@ -3557,7 +3650,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in EventLifecycleEvent) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(out *jwriter.Writer, in EventLifecycleEvent) {
out.RawByte('{')
first := true
_ = first
@@ -3565,6 +3658,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in
out.RawByte(',')
}
first = false
+ out.RawString("\"frameId\":")
+ out.String(string(in.FrameID))
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
out.RawString("\"name\":")
out.String(string(in.Name))
if !first {
@@ -3583,27 +3682,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventLifecycleEvent) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventLifecycleEvent) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventLifecycleEvent) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventLifecycleEvent) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(in *jlexer.Lexer, out *EventJavascriptDialogOpening) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(in *jlexer.Lexer, out *EventJavascriptDialogOpening) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3640,7 +3739,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(out *jwriter.Writer, in EventJavascriptDialogOpening) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(out *jwriter.Writer, in EventJavascriptDialogOpening) {
out.RawByte('{')
first := true
_ = first
@@ -3676,27 +3775,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventJavascriptDialogOpening) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventJavascriptDialogOpening) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventJavascriptDialogOpening) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventJavascriptDialogOpening) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(in *jlexer.Lexer, out *EventJavascriptDialogClosed) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(in *jlexer.Lexer, out *EventJavascriptDialogClosed) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3729,7 +3828,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(out *jwriter.Writer, in EventJavascriptDialogClosed) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(out *jwriter.Writer, in EventJavascriptDialogClosed) {
out.RawByte('{')
first := true
_ = first
@@ -3751,27 +3850,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventJavascriptDialogClosed) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventJavascriptDialogClosed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventJavascriptDialogClosed) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventJavascriptDialogClosed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(in *jlexer.Lexer, out *EventInterstitialShown) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(in *jlexer.Lexer, out *EventInterstitialShown) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3800,7 +3899,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(out *jwriter.Writer, in EventInterstitialShown) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(out *jwriter.Writer, in EventInterstitialShown) {
out.RawByte('{')
first := true
_ = first
@@ -3810,27 +3909,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventInterstitialShown) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventInterstitialShown) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventInterstitialShown) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventInterstitialShown) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(in *jlexer.Lexer, out *EventInterstitialHidden) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(in *jlexer.Lexer, out *EventInterstitialHidden) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3859,7 +3958,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(out *jwriter.Writer, in EventInterstitialHidden) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in EventInterstitialHidden) {
out.RawByte('{')
first := true
_ = first
@@ -3869,27 +3968,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventInterstitialHidden) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventInterstitialHidden) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventInterstitialHidden) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventInterstitialHidden) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(in *jlexer.Lexer, out *EventFrameStoppedLoading) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(in *jlexer.Lexer, out *EventFrameStoppedLoading) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3920,7 +4019,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in EventFrameStoppedLoading) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(out *jwriter.Writer, in EventFrameStoppedLoading) {
out.RawByte('{')
first := true
_ = first
@@ -3936,27 +4035,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameStoppedLoading) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameStoppedLoading) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameStoppedLoading) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameStoppedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(in *jlexer.Lexer, out *EventFrameStartedLoading) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(in *jlexer.Lexer, out *EventFrameStartedLoading) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -3987,7 +4086,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(out *jwriter.Writer, in EventFrameStartedLoading) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(out *jwriter.Writer, in EventFrameStartedLoading) {
out.RawByte('{')
first := true
_ = first
@@ -4003,27 +4102,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameStartedLoading) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameStartedLoading) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameStartedLoading) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameStartedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(in *jlexer.Lexer, out *EventFrameScheduledNavigation) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(in *jlexer.Lexer, out *EventFrameScheduledNavigation) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4060,7 +4159,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(out *jwriter.Writer, in EventFrameScheduledNavigation) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in EventFrameScheduledNavigation) {
out.RawByte('{')
first := true
_ = first
@@ -4094,27 +4193,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameScheduledNavigation) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameScheduledNavigation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameScheduledNavigation) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameScheduledNavigation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(in *jlexer.Lexer, out *EventFrameResized) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(in *jlexer.Lexer, out *EventFrameResized) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4143,7 +4242,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in EventFrameResized) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(out *jwriter.Writer, in EventFrameResized) {
out.RawByte('{')
first := true
_ = first
@@ -4153,27 +4252,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameResized) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameResized) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameResized) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameResized) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(in *jlexer.Lexer, out *EventFrameNavigated) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(in *jlexer.Lexer, out *EventFrameNavigated) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4212,7 +4311,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(out *jwriter.Writer, in EventFrameNavigated) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in EventFrameNavigated) {
out.RawByte('{')
first := true
_ = first
@@ -4232,27 +4331,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameNavigated) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameNavigated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameNavigated) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameNavigated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(in *jlexer.Lexer, out *EventFrameDetached) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(in *jlexer.Lexer, out *EventFrameDetached) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4283,7 +4382,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in EventFrameDetached) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in EventFrameDetached) {
out.RawByte('{')
first := true
_ = first
@@ -4299,27 +4398,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameDetached) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameDetached) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameDetached) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameDetached) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(in *jlexer.Lexer, out *EventFrameClearedScheduledNavigation) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(in *jlexer.Lexer, out *EventFrameClearedScheduledNavigation) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4350,7 +4449,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in EventFrameClearedScheduledNavigation) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in EventFrameClearedScheduledNavigation) {
out.RawByte('{')
first := true
_ = first
@@ -4366,27 +4465,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameClearedScheduledNavigation) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameClearedScheduledNavigation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameClearedScheduledNavigation) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameClearedScheduledNavigation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(in *jlexer.Lexer, out *EventFrameAttached) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(in *jlexer.Lexer, out *EventFrameAttached) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4429,7 +4528,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in EventFrameAttached) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(out *jwriter.Writer, in EventFrameAttached) {
out.RawByte('{')
first := true
_ = first
@@ -4463,27 +4562,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventFrameAttached) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventFrameAttached) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventFrameAttached) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventFrameAttached) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(in *jlexer.Lexer, out *EventDomContentEventFired) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(in *jlexer.Lexer, out *EventDomContentEventFired) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4522,7 +4621,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(out *jwriter.Writer, in EventDomContentEventFired) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(out *jwriter.Writer, in EventDomContentEventFired) {
out.RawByte('{')
first := true
_ = first
@@ -4542,27 +4641,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EventDomContentEventFired) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventDomContentEventFired) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventDomContentEventFired) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventDomContentEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(in *jlexer.Lexer, out *EnableParams) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(in *jlexer.Lexer, out *EnableParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4591,7 +4690,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(out *jwriter.Writer, in EnableParams) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(out *jwriter.Writer, in EnableParams) {
out.RawByte('{')
first := true
_ = first
@@ -4601,27 +4700,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v EnableParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EnableParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(in *jlexer.Lexer, out *DisableParams) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(in *jlexer.Lexer, out *DisableParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4650,7 +4749,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(out *jwriter.Writer, in DisableParams) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(out *jwriter.Writer, in DisableParams) {
out.RawByte('{')
first := true
_ = first
@@ -4660,27 +4759,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v DisableParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *DisableParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(in *jlexer.Lexer, out *CreateIsolatedWorldReturns) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(in *jlexer.Lexer, out *CreateIsolatedWorldReturns) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4711,7 +4810,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(out *jwriter.Writer, in CreateIsolatedWorldReturns) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(out *jwriter.Writer, in CreateIsolatedWorldReturns) {
out.RawByte('{')
first := true
_ = first
@@ -4729,27 +4828,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v CreateIsolatedWorldReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v CreateIsolatedWorldReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *CreateIsolatedWorldReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CreateIsolatedWorldReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(in *jlexer.Lexer, out *CreateIsolatedWorldParams) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(in *jlexer.Lexer, out *CreateIsolatedWorldParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4784,7 +4883,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(out *jwriter.Writer, in CreateIsolatedWorldParams) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(out *jwriter.Writer, in CreateIsolatedWorldParams) {
out.RawByte('{')
first := true
_ = first
@@ -4816,27 +4915,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v CreateIsolatedWorldParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v CreateIsolatedWorldParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *CreateIsolatedWorldParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CreateIsolatedWorldParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(in *jlexer.Lexer, out *CaptureScreenshotReturns) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(in *jlexer.Lexer, out *CaptureScreenshotReturns) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4867,7 +4966,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(out *jwriter.Writer, in CaptureScreenshotReturns) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in CaptureScreenshotReturns) {
out.RawByte('{')
first := true
_ = first
@@ -4885,27 +4984,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v CaptureScreenshotReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v CaptureScreenshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *CaptureScreenshotReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CaptureScreenshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(in *jlexer.Lexer, out *CaptureScreenshotParams) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(in *jlexer.Lexer, out *CaptureScreenshotParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -4950,7 +5049,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in CaptureScreenshotParams) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(out *jwriter.Writer, in CaptureScreenshotParams) {
out.RawByte('{')
first := true
_ = first
@@ -4996,27 +5095,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v CaptureScreenshotParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v CaptureScreenshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *CaptureScreenshotParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CaptureScreenshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(in *jlexer.Lexer, out *BringToFrontParams) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage60(in *jlexer.Lexer, out *BringToFrontParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -5045,7 +5144,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(out *jwriter.Writer, in BringToFrontParams) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage60(out *jwriter.Writer, in BringToFrontParams) {
out.RawByte('{')
first := true
_ = first
@@ -5055,27 +5154,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v BringToFrontParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage60(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v BringToFrontParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage60(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *BringToFrontParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage60(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *BringToFrontParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage60(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage60(in *jlexer.Lexer, out *AppManifestError) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage61(in *jlexer.Lexer, out *AppManifestError) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -5112,7 +5211,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage60(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage60(out *jwriter.Writer, in AppManifestError) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage61(out *jwriter.Writer, in AppManifestError) {
out.RawByte('{')
first := true
_ = first
@@ -5146,27 +5245,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage60(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v AppManifestError) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage60(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage61(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v AppManifestError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage60(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage61(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *AppManifestError) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage60(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage61(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AppManifestError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage60(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage61(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage61(in *jlexer.Lexer, out *AddScriptToEvaluateOnNewDocumentReturns) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage62(in *jlexer.Lexer, out *AddScriptToEvaluateOnNewDocumentReturns) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -5197,7 +5296,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage61(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage61(out *jwriter.Writer, in AddScriptToEvaluateOnNewDocumentReturns) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage62(out *jwriter.Writer, in AddScriptToEvaluateOnNewDocumentReturns) {
out.RawByte('{')
first := true
_ = first
@@ -5215,27 +5314,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage61(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v AddScriptToEvaluateOnNewDocumentReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage61(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage62(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v AddScriptToEvaluateOnNewDocumentReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage61(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage62(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *AddScriptToEvaluateOnNewDocumentReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage61(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage62(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AddScriptToEvaluateOnNewDocumentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage61(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage62(l, v)
}
-func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage62(in *jlexer.Lexer, out *AddScriptToEvaluateOnNewDocumentParams) {
+func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage63(in *jlexer.Lexer, out *AddScriptToEvaluateOnNewDocumentParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
@@ -5266,7 +5365,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage62(in *jlexer.Lexer, out *
in.Consumed()
}
}
-func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage62(out *jwriter.Writer, in AddScriptToEvaluateOnNewDocumentParams) {
+func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage63(out *jwriter.Writer, in AddScriptToEvaluateOnNewDocumentParams) {
out.RawByte('{')
first := true
_ = first
@@ -5282,23 +5381,23 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage62(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface
func (v AddScriptToEvaluateOnNewDocumentParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage62(&w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage63(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v AddScriptToEvaluateOnNewDocumentParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage62(w, v)
+ easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage63(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *AddScriptToEvaluateOnNewDocumentParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage62(&r, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage63(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AddScriptToEvaluateOnNewDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage62(l, v)
+ easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage63(l, v)
}
diff --git a/cdp/page/events.go b/cdp/page/events.go
index 17b26b1..943f7f9 100644
--- a/cdp/page/events.go
+++ b/cdp/page/events.go
@@ -20,6 +20,7 @@ type EventLoadEventFired struct {
// EventLifecycleEvent fired for top level page lifecycle events such as
// navigation, load, paint, etc.
type EventLifecycleEvent struct {
+ FrameID cdp.FrameID `json:"frameId"` // Id of the frame.
Name string `json:"name"`
Timestamp *cdp.MonotonicTime `json:"timestamp"`
}
@@ -106,6 +107,14 @@ type EventInterstitialShown struct{}
// EventInterstitialHidden fired when interstitial page was hidden.
type EventInterstitialHidden struct{}
+// EventWindowOpen fired when window.open() was called.
+type EventWindowOpen struct {
+ URL string `json:"url"` // The URL for the new window.
+ WindowName string `json:"windowName"` // Window name passed to window.open().
+ WindowFeatures string `json:"windowFeatures"` // Window features passed to window.open().
+ UserGesture bool `json:"userGesture"` // Whether or not window.open() was triggered by user gesture.
+}
+
// EventTypes all event types in the domain.
var EventTypes = []cdp.MethodType{
cdp.EventPageDomContentEventFired,
@@ -125,4 +134,5 @@ var EventTypes = []cdp.MethodType{
cdp.EventPageScreencastVisibilityChanged,
cdp.EventPageInterstitialShown,
cdp.EventPageInterstitialHidden,
+ cdp.EventPageWindowOpen,
}
diff --git a/cdp/target/easyjson.go b/cdp/target/easyjson.go
index cad8d2d..f56a9b6 100644
--- a/cdp/target/easyjson.go
+++ b/cdp/target/easyjson.go
@@ -518,6 +518,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(in *jlexer.Lexer, out
out.URL = string(in.String())
case "attached":
out.Attached = bool(in.Bool())
+ case "openerId":
+ out.OpenerID = ID(in.String())
default:
in.SkipRecursive()
}
@@ -562,6 +564,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(out *jwriter.Writer, i
first = false
out.RawString("\"attached\":")
out.Bool(bool(in.Attached))
+ if in.OpenerID != "" {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"openerId\":")
+ out.String(string(in.OpenerID))
+ }
out.RawByte('}')
}
@@ -1671,6 +1681,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget21(in *jlexer.Lexer, out
out.Height = int64(in.Int64())
case "browserContextId":
out.BrowserContextID = BrowserContextID(in.String())
+ case "enableBeginFrameControl":
+ out.EnableBeginFrameControl = bool(in.Bool())
default:
in.SkipRecursive()
}
@@ -1715,6 +1727,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget21(out *jwriter.Writer,
out.RawString("\"browserContextId\":")
out.String(string(in.BrowserContextID))
}
+ if in.EnableBeginFrameControl {
+ if !first {
+ out.RawByte(',')
+ }
+ first = false
+ out.RawString("\"enableBeginFrameControl\":")
+ out.Bool(bool(in.EnableBeginFrameControl))
+ }
out.RawByte('}')
}
diff --git a/cdp/target/target.go b/cdp/target/target.go
index 5c163d3..a43d91d 100644
--- a/cdp/target/target.go
+++ b/cdp/target/target.go
@@ -366,10 +366,11 @@ func (p *DisposeBrowserContextParams) Do(ctxt context.Context, h cdp.Handler) (s
// CreateTargetParams creates a new page.
type CreateTargetParams struct {
- URL string `json:"url"` // The initial URL the page will be navigated to.
- Width int64 `json:"width,omitempty"` // Frame width in DIP (headless chrome only).
- Height int64 `json:"height,omitempty"` // Frame height in DIP (headless chrome only).
- BrowserContextID BrowserContextID `json:"browserContextId,omitempty"` // The browser context to create the page in (headless chrome only).
+ URL string `json:"url"` // The initial URL the page will be navigated to.
+ Width int64 `json:"width,omitempty"` // Frame width in DIP (headless chrome only).
+ Height int64 `json:"height,omitempty"` // Frame height in DIP (headless chrome only).
+ BrowserContextID BrowserContextID `json:"browserContextId,omitempty"` // The browser context to create the page in (headless chrome only).
+ EnableBeginFrameControl bool `json:"enableBeginFrameControl,omitempty"` // Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default).
}
// CreateTarget creates a new page.
@@ -401,6 +402,14 @@ func (p CreateTargetParams) WithBrowserContextID(browserContextID BrowserContext
return &p
}
+// WithEnableBeginFrameControl whether BeginFrames for this target will be
+// controlled via DevTools (headless chrome only, not supported on MacOS yet,
+// false by default).
+func (p CreateTargetParams) WithEnableBeginFrameControl(enableBeginFrameControl bool) *CreateTargetParams {
+ p.EnableBeginFrameControl = enableBeginFrameControl
+ return &p
+}
+
// CreateTargetReturns return values.
type CreateTargetReturns struct {
TargetID ID `json:"targetId,omitempty"` // The id of the page opened.
diff --git a/cdp/target/types.go b/cdp/target/types.go
index 887ebdc..78d2b91 100644
--- a/cdp/target/types.go
+++ b/cdp/target/types.go
@@ -32,7 +32,8 @@ type Info struct {
Type string `json:"type"`
Title string `json:"title"`
URL string `json:"url"`
- Attached bool `json:"attached"` // Whether the target has an attached client.
+ Attached bool `json:"attached"` // Whether the target has an attached client.
+ OpenerID ID `json:"openerId,omitempty"` // Opener target Id
}
// RemoteLocation [no description].
diff --git a/cmd/chromedp-gen/internal/domain.go b/cmd/chromedp-gen/internal/domain.go
index 8475301..736db9f 100644
--- a/cmd/chromedp-gen/internal/domain.go
+++ b/cmd/chromedp-gen/internal/domain.go
@@ -12,45 +12,46 @@ type DomainType string
// DomainType values.
const (
- DomainAccessibility DomainType = "Accessibility"
- DomainAnimation DomainType = "Animation"
- DomainApplicationCache DomainType = "ApplicationCache"
- DomainAudits DomainType = "Audits"
- DomainBrowser DomainType = "Browser"
- DomainCSS DomainType = "CSS"
- DomainCacheStorage DomainType = "CacheStorage"
- DomainConsole DomainType = "Console"
- DomainDOM DomainType = "DOM"
- DomainDOMDebugger DomainType = "DOMDebugger"
- DomainDOMSnapshot DomainType = "DOMSnapshot"
- DomainDOMStorage DomainType = "DOMStorage"
- DomainDatabase DomainType = "Database"
- DomainDebugger DomainType = "Debugger"
- DomainDeviceOrientation DomainType = "DeviceOrientation"
- DomainEmulation DomainType = "Emulation"
- DomainHAR DomainType = "HAR"
- DomainHeapProfiler DomainType = "HeapProfiler"
- DomainIO DomainType = "IO"
- DomainIndexedDB DomainType = "IndexedDB"
- DomainInput DomainType = "Input"
- DomainInspector DomainType = "Inspector"
- DomainLayerTree DomainType = "LayerTree"
- DomainLog DomainType = "Log"
- DomainMemory DomainType = "Memory"
- DomainNetwork DomainType = "Network"
- DomainOverlay DomainType = "Overlay"
- DomainPage DomainType = "Page"
- DomainPerformance DomainType = "Performance"
- DomainProfiler DomainType = "Profiler"
- DomainRuntime DomainType = "Runtime"
- DomainSchema DomainType = "Schema"
- DomainSecurity DomainType = "Security"
- DomainServiceWorker DomainType = "ServiceWorker"
- DomainStorage DomainType = "Storage"
- DomainSystemInfo DomainType = "SystemInfo"
- DomainTarget DomainType = "Target"
- DomainTethering DomainType = "Tethering"
- DomainTracing DomainType = "Tracing"
+ DomainAccessibility DomainType = "Accessibility"
+ DomainAnimation DomainType = "Animation"
+ DomainApplicationCache DomainType = "ApplicationCache"
+ DomainAudits DomainType = "Audits"
+ DomainBrowser DomainType = "Browser"
+ DomainCSS DomainType = "CSS"
+ DomainCacheStorage DomainType = "CacheStorage"
+ DomainConsole DomainType = "Console"
+ DomainDOM DomainType = "DOM"
+ DomainDOMDebugger DomainType = "DOMDebugger"
+ DomainDOMSnapshot DomainType = "DOMSnapshot"
+ DomainDOMStorage DomainType = "DOMStorage"
+ DomainDatabase DomainType = "Database"
+ DomainDebugger DomainType = "Debugger"
+ DomainDeviceOrientation DomainType = "DeviceOrientation"
+ DomainEmulation DomainType = "Emulation"
+ DomainHAR DomainType = "HAR"
+ DomainHeadlessExperimental DomainType = "HeadlessExperimental"
+ DomainHeapProfiler DomainType = "HeapProfiler"
+ DomainIO DomainType = "IO"
+ DomainIndexedDB DomainType = "IndexedDB"
+ DomainInput DomainType = "Input"
+ DomainInspector DomainType = "Inspector"
+ DomainLayerTree DomainType = "LayerTree"
+ DomainLog DomainType = "Log"
+ DomainMemory DomainType = "Memory"
+ DomainNetwork DomainType = "Network"
+ DomainOverlay DomainType = "Overlay"
+ DomainPage DomainType = "Page"
+ DomainPerformance DomainType = "Performance"
+ DomainProfiler DomainType = "Profiler"
+ DomainRuntime DomainType = "Runtime"
+ DomainSchema DomainType = "Schema"
+ DomainSecurity DomainType = "Security"
+ DomainServiceWorker DomainType = "ServiceWorker"
+ DomainStorage DomainType = "Storage"
+ DomainSystemInfo DomainType = "SystemInfo"
+ DomainTarget DomainType = "Target"
+ DomainTethering DomainType = "Tethering"
+ DomainTracing DomainType = "Tracing"
)
// String satisfies Stringer.
@@ -105,6 +106,8 @@ func (dt *DomainType) UnmarshalJSON(buf []byte) error {
*dt = DomainEmulation
case DomainHAR:
*dt = DomainHAR
+ case DomainHeadlessExperimental:
+ *dt = DomainHeadlessExperimental
case DomainHeapProfiler:
*dt = DomainHeapProfiler
case DomainIO:
diff --git a/cmd/chromedp-gen/protocol.json b/cmd/chromedp-gen/protocol.json
index bb73d6b..fb3b9f9 100644
--- a/cmd/chromedp-gen/protocol.json
+++ b/cmd/chromedp-gen/protocol.json
@@ -973,6 +973,12 @@
"$ref": "Emulation.ScreenOrientation",
"optional": true,
"description": "Screen orientation override."
+ },
+ {
+ "name": "viewport",
+ "$ref": "Viewport",
+ "optional": true,
+ "description": "The viewport dimensions and scale. If not set, the override is cleared."
}
],
"redirect": "Emulation",
@@ -1402,6 +1408,11 @@
{
"name": "lifecycleEvent",
"parameters": [
+ {
+ "name": "frameId",
+ "$ref": "FrameId",
+ "description": "Id of the frame."
+ },
{
"name": "name",
"type": "string"
@@ -1620,6 +1631,33 @@
{
"name": "interstitialHidden",
"description": "Fired when interstitial page was hidden"
+ },
+ {
+ "name": "windowOpen",
+ "description": "Fired when window.open() was called",
+ "parameters": [
+ {
+ "name": "url",
+ "type": "string",
+ "description": "The URL for the new window."
+ },
+ {
+ "name": "windowName",
+ "type": "string",
+ "description": "Window name passed to window.open()."
+ },
+ {
+ "name": "windowFeatures",
+ "type": "string",
+ "description": "Window features passed to window.open()."
+ },
+ {
+ "name": "userGesture",
+ "type": "boolean",
+ "description": "Whether or not window.open() was triggered by user gesture."
+ }
+ ],
+ "experimental": true
}
]
},
@@ -2004,7 +2042,8 @@
"domain": "Emulation",
"description": "This domain emulates different environments for the page.",
"dependencies": [
- "DOM"
+ "DOM",
+ "Page"
],
"types": [
{
@@ -2113,6 +2152,13 @@
"$ref": "ScreenOrientation",
"optional": true,
"description": "Screen orientation override."
+ },
+ {
+ "name": "viewport",
+ "$ref": "Page.Viewport",
+ "optional": true,
+ "experimental": true,
+ "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions."
}
]
},
@@ -3827,7 +3873,7 @@
},
{
"name": "setRequestInterceptionEnabled",
- "description": "Sets the requests to intercept that match a the provided patterns.",
+ "description": "Sets the requests to intercept that match a the provided patterns and optionally resource types.",
"parameters": [
{
"name": "enabled",
@@ -3842,6 +3888,15 @@
"type": "string"
},
"description": "URLs matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call. Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. If omitted equivalent to ['*'] (intercept all)."
+ },
+ {
+ "name": "resourceTypes",
+ "type": "array",
+ "optional": true,
+ "items": {
+ "$ref": "Page.ResourceType"
+ },
+ "description": "If set, only requests for matching resource types will be intercepted."
}
],
"experimental": true
@@ -8645,6 +8700,12 @@
"name": "attached",
"type": "boolean",
"description": "Whether the target has an attached client."
+ },
+ {
+ "name": "openerId",
+ "optional": true,
+ "$ref": "TargetID",
+ "description": "Opener target Id"
}
]
},
@@ -8869,6 +8930,13 @@
"$ref": "BrowserContextID",
"description": "The browser context to create the page in (headless chrome only).",
"optional": true
+ },
+ {
+ "name": "enableBeginFrameControl",
+ "type": "boolean",
+ "description": "Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default).",
+ "optional": true,
+ "experimental": true
}
],
"returns": [
@@ -8986,6 +9054,110 @@
}
]
},
+ {
+ "domain": "HeadlessExperimental",
+ "experimental": true,
+ "description": "This domain provides experimental commands only supported in headless mode.",
+ "dependencies": [
+ "Page",
+ "Runtime"
+ ],
+ "types": [
+ {
+ "id": "ScreenshotParams",
+ "type": "object",
+ "properties": [
+ {
+ "name": "format",
+ "type": "string",
+ "optional": true,
+ "enum": [
+ "jpeg",
+ "png"
+ ],
+ "description": "Image compression format (defaults to png)."
+ },
+ {
+ "name": "quality",
+ "type": "integer",
+ "optional": true,
+ "description": "Compression quality from range [0..100] (jpeg only)."
+ }
+ ],
+ "description": "Encoding options for a screenshot."
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Enables headless events for the target."
+ },
+ {
+ "name": "disable",
+ "description": "Disables headless events for the target."
+ },
+ {
+ "name": "beginFrame",
+ "parameters": [
+ {
+ "name": "frameTime",
+ "$ref": "Runtime.Timestamp",
+ "optional": true,
+ "description": "Timestamp of this BeginFrame (milliseconds since epoch). If not set, the current time will be used."
+ },
+ {
+ "name": "deadline",
+ "$ref": "Runtime.Timestamp",
+ "optional": true,
+ "description": "Deadline of this BeginFrame (milliseconds since epoch). If not set, the deadline will be calculated from the frameTime and interval."
+ },
+ {
+ "name": "interval",
+ "type": "number",
+ "optional": true,
+ "description": "The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds."
+ },
+ {
+ "name": "screenshot",
+ "$ref": "ScreenshotParams",
+ "optional": true,
+ "description": "If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured."
+ }
+ ],
+ "returns": [
+ {
+ "name": "hasDamage",
+ "type": "boolean",
+ "description": "Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display."
+ },
+ {
+ "name": "screenshotData",
+ "type": "string",
+ "optional": true,
+ "description": "Base64-encoded image data of the screenshot, if one was requested and successfully taken."
+ }
+ ],
+ "description": "Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl."
+ }
+ ],
+ "events": [
+ {
+ "name": "needsBeginFramesChanged",
+ "description": "Issued when the target starts or stops needing BeginFrames.",
+ "parameters": [
+ {
+ "name": "needsBeginFrames",
+ "type": "boolean",
+ "description": "True if BeginFrames are needed, false otherwise."
+ }
+ ]
+ },
+ {
+ "name": "mainFrameReadyForScreenshots",
+ "description": "Issued when the main frame has first submitted a frame to the browser. May only be fired while a BeginFrame is in flight. Before this event, screenshotting requests may fail."
+ }
+ ]
+ },
{
"domain": "ServiceWorker",
"experimental": true,
@@ -11712,6 +11884,10 @@
}
],
"commands": [
+ {
+ "name": "close",
+ "description": "Close browser gracefully."
+ },
{
"name": "getWindowForTarget",
"description": "Get the browser window that contains the devtools target.",
@@ -13219,6 +13395,13 @@
"optional": true,
"description": "Regex pattern for the URLs of the resources to set breakpoints on. Either url
or urlRegex
must be specified."
},
+ {
+ "name": "scriptHash",
+ "type": "string",
+ "optional": true,
+ "experimental": true,
+ "description": "Script hash of the resources to set breakpoint on."
+ },
{
"name": "columnNumber",
"type": "integer",
diff --git a/cmd/chromedp-gen/templates/domain.qtpl b/cmd/chromedp-gen/templates/domain.qtpl
index 2064570..7bdef64 100644
--- a/cmd/chromedp-gen/templates/domain.qtpl
+++ b/cmd/chromedp-gen/templates/domain.qtpl
@@ -127,7 +127,7 @@ func (p *{%s= typ %}) Do(ctxt context.Context, h cdp.Handler) ({%s= retTypeList
if res.Base64encoded {{% endif %}
dec, err = base64.StdEncoding.DecodeString(res.{%s= b64ret.GoName(false) %})
if err != nil {
- return nil, err
+ return {%s= emptyRet %}err
}{% if b64cond %}
} else {
dec = []byte(res.{%s= b64ret.GoName(false) %})
diff --git a/cmd/chromedp-gen/templates/domain.qtpl.go b/cmd/chromedp-gen/templates/domain.qtpl.go
index 5ab840b..08d6e14 100644
--- a/cmd/chromedp-gen/templates/domain.qtpl.go
+++ b/cmd/chromedp-gen/templates/domain.qtpl.go
@@ -549,7 +549,11 @@ func (p *`)
//line templates/domain.qtpl:128
qw422016.N().S(`)
if err != nil {
- return nil, err
+ return `)
+ //line templates/domain.qtpl:130
+ qw422016.N().S(emptyRet)
+ //line templates/domain.qtpl:130
+ qw422016.N().S(`err
}`)
//line templates/domain.qtpl:131
if b64cond {