diff --git a/cdp/network/easyjson.go b/cdp/network/easyjson.go index 515642c..e6b8fa5 100644 --- a/cdp/network/easyjson.go +++ b/cdp/network/easyjson.go @@ -2017,6 +2017,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(in *jlexer.Lexer, ou (out.InitialPriority).UnmarshalEasyJSON(in) case "referrerPolicy": (out.ReferrerPolicy).UnmarshalEasyJSON(in) + case "isLinkPreload": + out.IsLinkPreload = bool(in.Bool()) default: in.SkipRecursive() } @@ -2091,6 +2093,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(out *jwriter.Writer, out.RawString("\"referrerPolicy\":") (in.ReferrerPolicy).MarshalEasyJSON(out) } + if in.IsLinkPreload { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"isLinkPreload\":") + out.Bool(bool(in.IsLinkPreload)) + } out.RawByte('}') } diff --git a/cdp/network/network.go b/cdp/network/network.go index a6a5ad3..1e4e89d 100644 --- a/cdp/network/network.go +++ b/cdp/network/network.go @@ -160,15 +160,15 @@ func (p *GetResponseBodyParams) Do(ctxt context.Context, h cdp.Handler) (body [] return dec, nil } -// SetBlockedURLSParams blocks specific URL from loading. +// SetBlockedURLSParams blocks URLs from loading. type SetBlockedURLSParams struct { - Urls []string `json:"urls"` // URLs to block. + Urls []string `json:"urls"` // URL patterns to block. Wildcards ('*') are allowed. } -// SetBlockedURLS blocks specific URL from loading. +// SetBlockedURLS blocks URLs from loading. // // parameters: -// urls - URLs to block. +// urls - URL patterns to block. Wildcards ('*') are allowed. func SetBlockedURLS(urls []string) *SetBlockedURLSParams { return &SetBlockedURLSParams{ Urls: urls, diff --git a/cdp/network/types.go b/cdp/network/types.go index 24fa630..d5fb46f 100644 --- a/cdp/network/types.go +++ b/cdp/network/types.go @@ -211,6 +211,7 @@ type Request struct { MixedContentType MixedContentType `json:"mixedContentType,omitempty"` // The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/ InitialPriority ResourcePriority `json:"initialPriority,omitempty"` // Priority of the resource request at the time request is sent. ReferrerPolicy ReferrerPolicy `json:"referrerPolicy,omitempty"` // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ + IsLinkPreload bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload. } // SignedCertificateTimestamp details of a signed certificate timestamp diff --git a/cdp/security/easyjson.go b/cdp/security/easyjson.go index 4a62878..e96d2cf 100644 --- a/cdp/security/easyjson.go +++ b/cdp/security/easyjson.go @@ -265,6 +265,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(in *jlexer.Lexer, ou out.RanMixedContent = bool(in.Bool()) case "displayedMixedContent": out.DisplayedMixedContent = bool(in.Bool()) + case "containedMixedForm": + out.ContainedMixedForm = bool(in.Bool()) case "ranContentWithCertErrors": out.RanContentWithCertErrors = bool(in.Bool()) case "displayedContentWithCertErrors": @@ -303,6 +305,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer, out.RawString("\"displayedMixedContent\":") out.Bool(bool(in.DisplayedMixedContent)) } + if in.ContainedMixedForm { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"containedMixedForm\":") + out.Bool(bool(in.ContainedMixedForm)) + } if in.RanContentWithCertErrors { if !first { out.RawByte(',') diff --git a/cdp/security/types.go b/cdp/security/types.go index 7e917b2..1c0d237 100644 --- a/cdp/security/types.go +++ b/cdp/security/types.go @@ -85,6 +85,7 @@ type StateExplanation struct { type InsecureContentStatus struct { RanMixedContent bool `json:"ranMixedContent,omitempty"` // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts. DisplayedMixedContent bool `json:"displayedMixedContent,omitempty"` // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images. + ContainedMixedForm bool `json:"containedMixedForm,omitempty"` // True if the page was loaded over HTTPS and contained a form targeting an insecure url. RanContentWithCertErrors bool `json:"ranContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors. DisplayedContentWithCertErrors bool `json:"displayedContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors. RanInsecureContentStyle State `json:"ranInsecureContentStyle,omitempty"` // Security state representing a page that ran insecure content. diff --git a/cmd/chromedp-gen/protocol.json b/cmd/chromedp-gen/protocol.json index af7f881..618fcec 100644 --- a/cmd/chromedp-gen/protocol.json +++ b/cmd/chromedp-gen/protocol.json @@ -1803,6 +1803,11 @@ "type": "boolean", "description": "True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images." }, + { + "name": "containedMixedForm", + "type": "boolean", + "description": "True if the page was loaded over HTTPS and contained a form targeting an insecure url." + }, { "name": "ranContentWithCertErrors", "type": "boolean", @@ -2146,6 +2151,12 @@ "no-referrer-when-downgrade-origin-when-cross-origin" ], "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/" + }, + { + "name": "isLinkPreload", + "type": "boolean", + "optional": true, + "description": "Whether is loaded via link preload." } ] }, @@ -2673,7 +2684,7 @@ }, { "name": "setBlockedURLs", - "description": "Blocks specific URL from loading.", + "description": "Blocks URLs from loading.", "parameters": [ { "name": "urls", @@ -2681,7 +2692,7 @@ "items": { "type": "string" }, - "description": "URLs to block." + "description": "URL patterns to block. Wildcards ('*') are allowed." } ], "experimental": true