diff --git a/accessibility/easyjson.go b/accessibility/easyjson.go index c22cb692..6bdb8743 100644 --- a/accessibility/easyjson.go +++ b/accessibility/easyjson.go @@ -854,22 +854,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(in *jlexer.Lex case "childIds": if in.IsNull() { in.Skip() - out.ChildIds = nil + out.ChildIDs = nil } else { in.Delim('[') - if out.ChildIds == nil { + if out.ChildIDs == nil { if !in.IsDelim(']') { - out.ChildIds = make([]NodeID, 0, 4) + out.ChildIDs = make([]NodeID, 0, 4) } else { - out.ChildIds = []NodeID{} + out.ChildIDs = []NodeID{} } } else { - out.ChildIds = (out.ChildIds)[:0] + out.ChildIDs = (out.ChildIDs)[:0] } for !in.IsDelim(']') { var v12 NodeID v12 = NodeID(in.String()) - out.ChildIds = append(out.ChildIds, v12) + out.ChildIDs = append(out.ChildIDs, v12) in.WantComma() } in.Delim(']') @@ -963,12 +963,12 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(out *jwriter.W out.RawString(prefix) out.String(string(in.ParentID)) } - if len(in.ChildIds) != 0 { + if len(in.ChildIDs) != 0 { const prefix string = ",\"childIds\":" out.RawString(prefix) { out.RawByte('[') - for v17, v18 := range in.ChildIds { + for v17, v18 := range in.ChildIDs { if v17 > 0 { out.RawByte(',') } diff --git a/accessibility/types.go b/accessibility/types.go index dbe3442f..3d9db8bb 100644 --- a/accessibility/types.go +++ b/accessibility/types.go @@ -450,7 +450,7 @@ type Node struct { Value *Value `json:"value,omitempty"` // The value for this Node. Properties []*Property `json:"properties,omitempty"` // All other properties ParentID NodeID `json:"parentId,omitempty"` // ID for this node's parent. - ChildIds []NodeID `json:"childIds,omitempty"` // IDs for each of this node's child nodes. + ChildIDs []NodeID `json:"childIds,omitempty"` // IDs for each of this node's child nodes. BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId,omitempty"` // The backend ID for the associated DOM node, if any. FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame ID for the frame associated with this nodes document. } diff --git a/audits/easyjson.go b/audits/easyjson.go index 68100894..1124e5af 100644 --- a/audits/easyjson.go +++ b/audits/easyjson.go @@ -1816,8 +1816,6 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits17(in *jlexer.Lexer, ou } (*out.SourceCodeLocation).UnmarshalEasyJSON(in) } - case "deprecationType": - out.DeprecationType = string(in.String()) default: in.SkipRecursive() } @@ -1852,11 +1850,6 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits17(out *jwriter.Writer, (*in.SourceCodeLocation).MarshalEasyJSON(out) } } - { - const prefix string = ",\"deprecationType\":" - out.RawString(prefix) - out.String(string(in.DeprecationType)) - } out.RawByte('}') } diff --git a/audits/types.go b/audits/types.go index ff6571e3..c15bafed 100644 --- a/audits/types.go +++ b/audits/types.go @@ -951,7 +951,6 @@ type GenericIssueDetails struct { type DeprecationIssueDetails struct { AffectedFrame *AffectedFrame `json:"affectedFrame,omitempty"` SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"` - DeprecationType string `json:"deprecationType"` } // ClientHintIssueReason [no description]. diff --git a/cdproto.go b/cdproto.go index 621b459d..1e836141 100644 --- a/cdproto.go +++ b/cdproto.go @@ -196,7 +196,7 @@ const ( CommandDOMMoveTo = dom.CommandMoveTo CommandDOMPerformSearch = dom.CommandPerformSearch CommandDOMPushNodeByPathToFrontend = dom.CommandPushNodeByPathToFrontend - CommandDOMPushNodesByBackendIdsToFrontend = dom.CommandPushNodesByBackendIdsToFrontend + CommandDOMPushNodesByBackendIDsToFrontend = dom.CommandPushNodesByBackendIDsToFrontend CommandDOMQuerySelector = dom.CommandQuerySelector CommandDOMQuerySelectorAll = dom.CommandQuerySelectorAll CommandDOMRedo = dom.CommandRedo @@ -1119,8 +1119,8 @@ func UnmarshalMessage(msg *Message) (interface{}, error) { case CommandDOMPushNodeByPathToFrontend: v = new(dom.PushNodeByPathToFrontendReturns) - case CommandDOMPushNodesByBackendIdsToFrontend: - v = new(dom.PushNodesByBackendIdsToFrontendReturns) + case CommandDOMPushNodesByBackendIDsToFrontend: + v = new(dom.PushNodesByBackendIDsToFrontendReturns) case CommandDOMQuerySelector: v = new(dom.QuerySelectorReturns) diff --git a/css/css.go b/css/css.go index 47ea4d80..546fa7b3 100644 --- a/css/css.go +++ b/css/css.go @@ -579,14 +579,14 @@ func TakeComputedStyleUpdates() *TakeComputedStyleUpdatesParams { // TakeComputedStyleUpdatesReturns return values. type TakeComputedStyleUpdatesReturns struct { - NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // The list of node Ids that have their tracked computed styles updated + NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // The list of node Ids that have their tracked computed styles updated } // Do executes CSS.takeComputedStyleUpdates against the provided context. // // returns: -// nodeIds - The list of node Ids that have their tracked computed styles updated -func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) { +// nodeIDs - The list of node Ids that have their tracked computed styles updated +func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) { // execute var res TakeComputedStyleUpdatesReturns err = cdp.Execute(ctx, CommandTakeComputedStyleUpdates, nil, &res) @@ -594,7 +594,7 @@ func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIds []cdp. return nil, err } - return res.NodeIds, nil + return res.NodeIDs, nil } // SetEffectivePropertyValueForNodeParams find a rule with the given active diff --git a/css/easyjson.go b/css/easyjson.go index 38e867fe..525000dc 100644 --- a/css/easyjson.go +++ b/css/easyjson.go @@ -411,22 +411,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss4(in *jlexer.Lexer, out *T case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v7 cdp.NodeID (v7).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v7) + out.NodeIDs = append(out.NodeIDs, v7) in.WantComma() } in.Delim(']') @@ -445,13 +445,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss4(out *jwriter.Writer, in out.RawByte('{') first := true _ = first - if len(in.NodeIds) != 0 { + if len(in.NodeIDs) != 0 { const prefix string = ",\"nodeIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v8, v9 := range in.NodeIds { + for v8, v9 := range in.NodeIDs { if v8 > 0 { out.RawByte(',') } @@ -566,6 +566,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss6(in *jlexer.Lexer, out *S switch key { case "text": out.Text = string(in.String()) + case "active": + out.Active = bool(in.Bool()) case "range": if in.IsNull() { in.Skip() @@ -597,6 +599,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss6(out *jwriter.Writer, in out.RawString(prefix[1:]) out.String(string(in.Text)) } + { + const prefix string = ",\"active\":" + out.RawString(prefix) + out.Bool(bool(in.Active)) + } if in.Range != nil { const prefix string = ",\"range\":" out.RawString(prefix) diff --git a/css/types.go b/css/types.go index 67474937..2443df69 100644 --- a/css/types.go +++ b/css/types.go @@ -268,6 +268,7 @@ type ContainerQuery struct { // See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSSupports type Supports struct { Text string `json:"text"` // Supports rule text. + Active bool `json:"active"` // Whether the supports condition is satisfied. Range *SourceRange `json:"range,omitempty"` // The associated rule header range in the enclosing stylesheet (if available). StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists). } diff --git a/dom/dom.go b/dom/dom.go index 9292a018..5be59877 100644 --- a/dom/dom.go +++ b/dom/dom.go @@ -574,14 +574,14 @@ func (p GetNodesForSubtreeByStyleParams) WithPierce(pierce bool) *GetNodesForSub // GetNodesForSubtreeByStyleReturns return values. type GetNodesForSubtreeByStyleReturns struct { - NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Resulting nodes. + NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Resulting nodes. } // Do executes DOM.getNodesForSubtreeByStyle against the provided context. // // returns: -// nodeIds - Resulting nodes. -func (p *GetNodesForSubtreeByStyleParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) { +// nodeIDs - Resulting nodes. +func (p *GetNodesForSubtreeByStyleParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) { // execute var res GetNodesForSubtreeByStyleReturns err = cdp.Execute(ctx, CommandGetNodesForSubtreeByStyle, p, &res) @@ -589,7 +589,7 @@ func (p *GetNodesForSubtreeByStyleParams) Do(ctx context.Context) (nodeIds []cdp return nil, err } - return res.NodeIds, nil + return res.NodeIDs, nil } // GetNodeForLocationParams returns node id at given location. Depending on @@ -774,14 +774,14 @@ func GetSearchResults(searchID string, fromIndex int64, toIndex int64) *GetSearc // GetSearchResultsReturns return values. type GetSearchResultsReturns struct { - NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Ids of the search result nodes. + NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Ids of the search result nodes. } // Do executes DOM.getSearchResults against the provided context. // // returns: -// nodeIds - Ids of the search result nodes. -func (p *GetSearchResultsParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) { +// nodeIDs - Ids of the search result nodes. +func (p *GetSearchResultsParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) { // execute var res GetSearchResultsReturns err = cdp.Execute(ctx, CommandGetSearchResults, p, &res) @@ -789,7 +789,7 @@ func (p *GetSearchResultsParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, return nil, err } - return res.NodeIds, nil + return res.NodeIDs, nil } // MarkUndoableStateParams marks last undoable state. @@ -946,43 +946,43 @@ func (p *PushNodeByPathToFrontendParams) Do(ctx context.Context) (nodeID cdp.Nod return res.NodeID, nil } -// PushNodesByBackendIdsToFrontendParams requests that a batch of nodes is +// PushNodesByBackendIDsToFrontendParams requests that a batch of nodes is // sent to the caller given their backend node ids. -type PushNodesByBackendIdsToFrontendParams struct { - BackendNodeIds []cdp.BackendNodeID `json:"backendNodeIds"` // The array of backend node ids. +type PushNodesByBackendIDsToFrontendParams struct { + BackendNodeIDs []cdp.BackendNodeID `json:"backendNodeIds"` // The array of backend node ids. } -// PushNodesByBackendIdsToFrontend requests that a batch of nodes is sent to +// PushNodesByBackendIDsToFrontend requests that a batch of nodes is sent to // the caller given their backend node ids. // // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodesByBackendIdsToFrontend // // parameters: -// backendNodeIds - The array of backend node ids. -func PushNodesByBackendIdsToFrontend(backendNodeIds []cdp.BackendNodeID) *PushNodesByBackendIdsToFrontendParams { - return &PushNodesByBackendIdsToFrontendParams{ - BackendNodeIds: backendNodeIds, +// backendNodeIDs - The array of backend node ids. +func PushNodesByBackendIDsToFrontend(backendNodeIDs []cdp.BackendNodeID) *PushNodesByBackendIDsToFrontendParams { + return &PushNodesByBackendIDsToFrontendParams{ + BackendNodeIDs: backendNodeIDs, } } -// PushNodesByBackendIdsToFrontendReturns return values. -type PushNodesByBackendIdsToFrontendReturns struct { - NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. +// PushNodesByBackendIDsToFrontendReturns return values. +type PushNodesByBackendIDsToFrontendReturns struct { + NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. } // Do executes DOM.pushNodesByBackendIdsToFrontend against the provided context. // // returns: -// nodeIds - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. -func (p *PushNodesByBackendIdsToFrontendParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) { +// nodeIDs - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. +func (p *PushNodesByBackendIDsToFrontendParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) { // execute - var res PushNodesByBackendIdsToFrontendReturns - err = cdp.Execute(ctx, CommandPushNodesByBackendIdsToFrontend, p, &res) + var res PushNodesByBackendIDsToFrontendReturns + err = cdp.Execute(ctx, CommandPushNodesByBackendIDsToFrontend, p, &res) if err != nil { return nil, err } - return res.NodeIds, nil + return res.NodeIDs, nil } // QuerySelectorParams executes querySelector on a given node. @@ -1047,14 +1047,14 @@ func QuerySelectorAll(nodeID cdp.NodeID, selector string) *QuerySelectorAllParam // QuerySelectorAllReturns return values. type QuerySelectorAllReturns struct { - NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Query selector result. + NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Query selector result. } // Do executes DOM.querySelectorAll against the provided context. // // returns: -// nodeIds - Query selector result. -func (p *QuerySelectorAllParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) { +// nodeIDs - Query selector result. +func (p *QuerySelectorAllParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) { // execute var res QuerySelectorAllReturns err = cdp.Execute(ctx, CommandQuerySelectorAll, p, &res) @@ -1062,7 +1062,7 @@ func (p *QuerySelectorAllParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, return nil, err } - return res.NodeIds, nil + return res.NodeIDs, nil } // RedoParams re-does the last undone action. @@ -1729,14 +1729,14 @@ func GetQueryingDescendantsForContainer(nodeID cdp.NodeID) *GetQueryingDescendan // GetQueryingDescendantsForContainerReturns return values. type GetQueryingDescendantsForContainerReturns struct { - NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Descendant nodes with container queries against the given container. + NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Descendant nodes with container queries against the given container. } // Do executes DOM.getQueryingDescendantsForContainer against the provided context. // // returns: -// nodeIds - Descendant nodes with container queries against the given container. -func (p *GetQueryingDescendantsForContainerParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) { +// nodeIDs - Descendant nodes with container queries against the given container. +func (p *GetQueryingDescendantsForContainerParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) { // execute var res GetQueryingDescendantsForContainerReturns err = cdp.Execute(ctx, CommandGetQueryingDescendantsForContainer, p, &res) @@ -1744,7 +1744,7 @@ func (p *GetQueryingDescendantsForContainerParams) Do(ctx context.Context) (node return nil, err } - return res.NodeIds, nil + return res.NodeIDs, nil } // Command names. @@ -1770,7 +1770,7 @@ const ( CommandMoveTo = "DOM.moveTo" CommandPerformSearch = "DOM.performSearch" CommandPushNodeByPathToFrontend = "DOM.pushNodeByPathToFrontend" - CommandPushNodesByBackendIdsToFrontend = "DOM.pushNodesByBackendIdsToFrontend" + CommandPushNodesByBackendIDsToFrontend = "DOM.pushNodesByBackendIdsToFrontend" CommandQuerySelector = "DOM.querySelector" CommandQuerySelectorAll = "DOM.querySelectorAll" CommandRedo = "DOM.redo" diff --git a/dom/easyjson.go b/dom/easyjson.go index 782a122b..57d93f66 100644 --- a/dom/easyjson.go +++ b/dom/easyjson.go @@ -1900,22 +1900,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom23(in *jlexer.Lexer, out * case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v13 cdp.NodeID (v13).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v13) + out.NodeIDs = append(out.NodeIDs, v13) in.WantComma() } in.Delim(']') @@ -1934,13 +1934,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom23(out *jwriter.Writer, in out.RawByte('{') first := true _ = first - if len(in.NodeIds) != 0 { + if len(in.NodeIDs) != 0 { const prefix string = ",\"nodeIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v14, v15 := range in.NodeIds { + for v14, v15 := range in.NodeIDs { if v14 > 0 { out.RawByte(',') } @@ -2048,7 +2048,7 @@ func (v *QuerySelectorAllParams) UnmarshalJSON(data []byte) error { func (v *QuerySelectorAllParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom24(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendReturns) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(in *jlexer.Lexer, out *PushNodesByBackendIDsToFrontendReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2070,22 +2070,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(in *jlexer.Lexer, out * case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v16 cdp.NodeID (v16).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v16) + out.NodeIDs = append(out.NodeIDs, v16) in.WantComma() } in.Delim(']') @@ -2100,17 +2100,17 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendReturns) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(out *jwriter.Writer, in PushNodesByBackendIDsToFrontendReturns) { out.RawByte('{') first := true _ = first - if len(in.NodeIds) != 0 { + if len(in.NodeIDs) != 0 { const prefix string = ",\"nodeIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v17, v18 := range in.NodeIds { + for v17, v18 := range in.NodeIDs { if v17 > 0 { out.RawByte(',') } @@ -2123,29 +2123,29 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v PushNodesByBackendIdsToFrontendReturns) MarshalJSON() ([]byte, error) { +func (v PushNodesByBackendIDsToFrontendReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v PushNodesByBackendIdsToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v PushNodesByBackendIDsToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalJSON(data []byte) error { +func (v *PushNodesByBackendIDsToFrontendReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *PushNodesByBackendIDsToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(l, v) } -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendParams) { +func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(in *jlexer.Lexer, out *PushNodesByBackendIDsToFrontendParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2167,22 +2167,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(in *jlexer.Lexer, out * case "backendNodeIds": if in.IsNull() { in.Skip() - out.BackendNodeIds = nil + out.BackendNodeIDs = nil } else { in.Delim('[') - if out.BackendNodeIds == nil { + if out.BackendNodeIDs == nil { if !in.IsDelim(']') { - out.BackendNodeIds = make([]cdp.BackendNodeID, 0, 8) + out.BackendNodeIDs = make([]cdp.BackendNodeID, 0, 8) } else { - out.BackendNodeIds = []cdp.BackendNodeID{} + out.BackendNodeIDs = []cdp.BackendNodeID{} } } else { - out.BackendNodeIds = (out.BackendNodeIds)[:0] + out.BackendNodeIDs = (out.BackendNodeIDs)[:0] } for !in.IsDelim(']') { var v19 cdp.BackendNodeID (v19).UnmarshalEasyJSON(in) - out.BackendNodeIds = append(out.BackendNodeIds, v19) + out.BackendNodeIDs = append(out.BackendNodeIDs, v19) in.WantComma() } in.Delim(']') @@ -2197,18 +2197,18 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendParams) { +func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(out *jwriter.Writer, in PushNodesByBackendIDsToFrontendParams) { out.RawByte('{') first := true _ = first { const prefix string = ",\"backendNodeIds\":" out.RawString(prefix[1:]) - if in.BackendNodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + if in.BackendNodeIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v20, v21 := range in.BackendNodeIds { + for v20, v21 := range in.BackendNodeIDs { if v20 > 0 { out.RawByte(',') } @@ -2221,26 +2221,26 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v PushNodesByBackendIdsToFrontendParams) MarshalJSON() ([]byte, error) { +func (v PushNodesByBackendIDsToFrontendParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v PushNodesByBackendIdsToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v PushNodesByBackendIDsToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalJSON(data []byte) error { +func (v *PushNodesByBackendIDsToFrontendParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *PushNodesByBackendIDsToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(l, v) } func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom27(in *jlexer.Lexer, out *PushNodeByPathToFrontendReturns) { @@ -2756,22 +2756,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom34(in *jlexer.Lexer, out * case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v22 cdp.NodeID (v22).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v22) + out.NodeIDs = append(out.NodeIDs, v22) in.WantComma() } in.Delim(']') @@ -2790,13 +2790,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom34(out *jwriter.Writer, in out.RawByte('{') first := true _ = first - if len(in.NodeIds) != 0 { + if len(in.NodeIDs) != 0 { const prefix string = ",\"nodeIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v23, v24 := range in.NodeIds { + for v23, v24 := range in.NodeIDs { if v23 > 0 { out.RawByte(',') } @@ -3066,22 +3066,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom38(in *jlexer.Lexer, out * case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v25 cdp.NodeID (v25).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v25) + out.NodeIDs = append(out.NodeIDs, v25) in.WantComma() } in.Delim(']') @@ -3100,13 +3100,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom38(out *jwriter.Writer, in out.RawByte('{') first := true _ = first - if len(in.NodeIds) != 0 { + if len(in.NodeIDs) != 0 { const prefix string = ",\"nodeIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v26, v27 := range in.NodeIds { + for v26, v27 := range in.NodeIDs { if v26 > 0 { out.RawByte(',') } @@ -3387,22 +3387,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom42(in *jlexer.Lexer, out * case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v28 cdp.NodeID (v28).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v28) + out.NodeIDs = append(out.NodeIDs, v28) in.WantComma() } in.Delim(']') @@ -3421,13 +3421,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom42(out *jwriter.Writer, in out.RawByte('{') first := true _ = first - if len(in.NodeIds) != 0 { + if len(in.NodeIDs) != 0 { const prefix string = ",\"nodeIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v29, v30 := range in.NodeIds { + for v29, v30 := range in.NodeIDs { if v29 > 0 { out.RawByte(',') } @@ -5572,22 +5572,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom68(in *jlexer.Lexer, out * case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v46 cdp.NodeID (v46).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v46) + out.NodeIDs = append(out.NodeIDs, v46) in.WantComma() } in.Delim(']') @@ -5609,11 +5609,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom68(out *jwriter.Writer, in { const prefix string = ",\"nodeIds\":" out.RawString(prefix[1:]) - if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + if in.NodeIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v47, v48 := range in.NodeIds { + for v47, v48 := range in.NodeIDs { if v47 > 0 { out.RawByte(',') } diff --git a/dom/events.go b/dom/events.go index b698032b..f9284be5 100644 --- a/dom/events.go +++ b/dom/events.go @@ -76,7 +76,7 @@ type EventDocumentUpdated struct{} // // See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-inlineStyleInvalidated type EventInlineStyleInvalidated struct { - NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated. + NodeIDs []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated. } // EventPseudoElementAdded called when a pseudo element is added to an diff --git a/go.mod b/go.mod index 281ac76d..5e239c36 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ module github.com/chromedp/cdproto +go 1.18 + require ( github.com/chromedp/sysutil v1.0.0 github.com/mailru/easyjson v0.7.7 ) -go 1.14 +require github.com/josharian/intern v1.0.0 // indirect diff --git a/layertree/easyjson.go b/layertree/easyjson.go index 88578357..ce40844c 100644 --- a/layertree/easyjson.go +++ b/layertree/easyjson.go @@ -1796,22 +1796,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(in *jlexer.Lexer, case "compositingReasonIds": if in.IsNull() { in.Skip() - out.CompositingReasonIds = nil + out.CompositingReasonIDs = nil } else { in.Delim('[') - if out.CompositingReasonIds == nil { + if out.CompositingReasonIDs == nil { if !in.IsDelim(']') { - out.CompositingReasonIds = make([]string, 0, 4) + out.CompositingReasonIDs = make([]string, 0, 4) } else { - out.CompositingReasonIds = []string{} + out.CompositingReasonIDs = []string{} } } else { - out.CompositingReasonIds = (out.CompositingReasonIds)[:0] + out.CompositingReasonIDs = (out.CompositingReasonIDs)[:0] } for !in.IsDelim(']') { var v22 string v22 = string(in.String()) - out.CompositingReasonIds = append(out.CompositingReasonIds, v22) + out.CompositingReasonIDs = append(out.CompositingReasonIDs, v22) in.WantComma() } in.Delim(']') @@ -1830,13 +1830,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(out *jwriter.Writ out.RawByte('{') first := true _ = first - if len(in.CompositingReasonIds) != 0 { + if len(in.CompositingReasonIDs) != 0 { const prefix string = ",\"compositingReasonIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v23, v24 := range in.CompositingReasonIds { + for v23, v24 := range in.CompositingReasonIDs { if v23 > 0 { out.RawByte(',') } diff --git a/layertree/layertree.go b/layertree/layertree.go index 8848bf5c..463bf962 100644 --- a/layertree/layertree.go +++ b/layertree/layertree.go @@ -35,14 +35,14 @@ func CompositingReasons(layerID LayerID) *CompositingReasonsParams { // CompositingReasonsReturns return values. type CompositingReasonsReturns struct { - CompositingReasonIds []string `json:"compositingReasonIds,omitempty"` // A list of strings specifying reason IDs for the given layer to become composited. + CompositingReasonIDs []string `json:"compositingReasonIds,omitempty"` // A list of strings specifying reason IDs for the given layer to become composited. } // Do executes LayerTree.compositingReasons against the provided context. // // returns: -// compositingReasonIds - A list of strings specifying reason IDs for the given layer to become composited. -func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIds []string, err error) { +// compositingReasonIDs - A list of strings specifying reason IDs for the given layer to become composited. +func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIDs []string, err error) { // execute var res CompositingReasonsReturns err = cdp.Execute(ctx, CommandCompositingReasons, p, &res) @@ -50,7 +50,7 @@ func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIds return nil, err } - return res.CompositingReasonIds, nil + return res.CompositingReasonIDs, nil } // DisableParams disables compositing tree inspection. diff --git a/overlay/easyjson.go b/overlay/easyjson.go index f0bd28d2..67a8bf02 100644 --- a/overlay/easyjson.go +++ b/overlay/easyjson.go @@ -3733,22 +3733,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay36(in *jlexer.Lexer, o case "nodeIds": if in.IsNull() { in.Skip() - out.NodeIds = nil + out.NodeIDs = nil } else { in.Delim('[') - if out.NodeIds == nil { + if out.NodeIDs == nil { if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) + out.NodeIDs = make([]cdp.NodeID, 0, 8) } else { - out.NodeIds = []cdp.NodeID{} + out.NodeIDs = []cdp.NodeID{} } } else { - out.NodeIds = (out.NodeIds)[:0] + out.NodeIDs = (out.NodeIDs)[:0] } for !in.IsDelim(']') { var v19 cdp.NodeID (v19).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v19) + out.NodeIDs = append(out.NodeIDs, v19) in.WantComma() } in.Delim(']') @@ -3770,11 +3770,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay36(out *jwriter.Writer { const prefix string = ",\"nodeIds\":" out.RawString(prefix[1:]) - if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + if in.NodeIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v20, v21 := range in.NodeIds { + for v20, v21 := range in.NodeIDs { if v20 > 0 { out.RawByte(',') } diff --git a/overlay/overlay.go b/overlay/overlay.go index 4176f9d5..24899b8f 100644 --- a/overlay/overlay.go +++ b/overlay/overlay.go @@ -116,7 +116,7 @@ func (p *GetHighlightObjectForTestParams) Do(ctx context.Context) (highlight eas // GetGridHighlightObjectsForTestParams for Persistent Grid testing. type GetGridHighlightObjectsForTestParams struct { - NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the node to get highlight object for. + NodeIDs []cdp.NodeID `json:"nodeIds"` // Ids of the node to get highlight object for. } // GetGridHighlightObjectsForTest for Persistent Grid testing. @@ -124,10 +124,10 @@ type GetGridHighlightObjectsForTestParams struct { // See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getGridHighlightObjectsForTest // // parameters: -// nodeIds - Ids of the node to get highlight object for. -func GetGridHighlightObjectsForTest(nodeIds []cdp.NodeID) *GetGridHighlightObjectsForTestParams { +// nodeIDs - Ids of the node to get highlight object for. +func GetGridHighlightObjectsForTest(nodeIDs []cdp.NodeID) *GetGridHighlightObjectsForTestParams { return &GetGridHighlightObjectsForTestParams{ - NodeIds: nodeIds, + NodeIDs: nodeIDs, } } diff --git a/page/types.go b/page/types.go index 31f03a18..71aa0e31 100644 --- a/page/types.go +++ b/page/types.go @@ -30,6 +30,7 @@ const ( PermissionsPolicyFeatureAmbientLightSensor PermissionsPolicyFeature = "ambient-light-sensor" PermissionsPolicyFeatureAttributionReporting PermissionsPolicyFeature = "attribution-reporting" PermissionsPolicyFeatureAutoplay PermissionsPolicyFeature = "autoplay" + PermissionsPolicyFeatureBrowsingTopics PermissionsPolicyFeature = "browsing-topics" PermissionsPolicyFeatureCamera PermissionsPolicyFeature = "camera" PermissionsPolicyFeatureChDpr PermissionsPolicyFeature = "ch-dpr" PermissionsPolicyFeatureChDeviceMemory PermissionsPolicyFeature = "ch-device-memory" @@ -70,6 +71,7 @@ const ( PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope" PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid" PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection" + PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort" PermissionsPolicyFeatureJoinAdInterestGroup PermissionsPolicyFeature = "join-ad-interest-group" PermissionsPolicyFeatureKeyboardMap PermissionsPolicyFeature = "keyboard-map" PermissionsPolicyFeatureMagnetometer PermissionsPolicyFeature = "magnetometer" @@ -114,6 +116,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PermissionsPolicyFeatureAttributionReporting case PermissionsPolicyFeatureAutoplay: *t = PermissionsPolicyFeatureAutoplay + case PermissionsPolicyFeatureBrowsingTopics: + *t = PermissionsPolicyFeatureBrowsingTopics case PermissionsPolicyFeatureCamera: *t = PermissionsPolicyFeatureCamera case PermissionsPolicyFeatureChDpr: @@ -194,6 +198,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = PermissionsPolicyFeatureHid case PermissionsPolicyFeatureIdleDetection: *t = PermissionsPolicyFeatureIdleDetection + case PermissionsPolicyFeatureInterestCohort: + *t = PermissionsPolicyFeatureInterestCohort case PermissionsPolicyFeatureJoinAdInterestGroup: *t = PermissionsPolicyFeatureJoinAdInterestGroup case PermissionsPolicyFeatureKeyboardMap: @@ -894,6 +900,7 @@ const ( BackForwardCacheNotRestoredReasonNoResponseHead BackForwardCacheNotRestoredReason = "NoResponseHead" BackForwardCacheNotRestoredReasonUnknown BackForwardCacheNotRestoredReason = "Unknown" BackForwardCacheNotRestoredReasonActivationNavigationsDisallowedForBug1234857 BackForwardCacheNotRestoredReason = "ActivationNavigationsDisallowedForBug1234857" + BackForwardCacheNotRestoredReasonErrorDocument BackForwardCacheNotRestoredReason = "ErrorDocument" BackForwardCacheNotRestoredReasonWebSocket BackForwardCacheNotRestoredReason = "WebSocket" BackForwardCacheNotRestoredReasonWebTransport BackForwardCacheNotRestoredReason = "WebTransport" BackForwardCacheNotRestoredReasonWebRTC BackForwardCacheNotRestoredReason = "WebRTC" @@ -1085,6 +1092,8 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer) *t = BackForwardCacheNotRestoredReasonUnknown case BackForwardCacheNotRestoredReasonActivationNavigationsDisallowedForBug1234857: *t = BackForwardCacheNotRestoredReasonActivationNavigationsDisallowedForBug1234857 + case BackForwardCacheNotRestoredReasonErrorDocument: + *t = BackForwardCacheNotRestoredReasonErrorDocument case BackForwardCacheNotRestoredReasonWebSocket: *t = BackForwardCacheNotRestoredReasonWebSocket case BackForwardCacheNotRestoredReasonWebTransport: diff --git a/security/easyjson.go b/security/easyjson.go index 867dbd60..6e8ffd34 100644 --- a/security/easyjson.go +++ b/security/easyjson.go @@ -62,22 +62,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(in *jlexer.Lexer, ou case "securityStateIssueIds": if in.IsNull() { in.Skip() - out.SecurityStateIssueIds = nil + out.SecurityStateIssueIDs = nil } else { in.Delim('[') - if out.SecurityStateIssueIds == nil { + if out.SecurityStateIssueIDs == nil { if !in.IsDelim(']') { - out.SecurityStateIssueIds = make([]string, 0, 4) + out.SecurityStateIssueIDs = make([]string, 0, 4) } else { - out.SecurityStateIssueIds = []string{} + out.SecurityStateIssueIDs = []string{} } } else { - out.SecurityStateIssueIds = (out.SecurityStateIssueIds)[:0] + out.SecurityStateIssueIDs = (out.SecurityStateIssueIDs)[:0] } for !in.IsDelim(']') { var v1 string v1 = string(in.String()) - out.SecurityStateIssueIds = append(out.SecurityStateIssueIds, v1) + out.SecurityStateIssueIDs = append(out.SecurityStateIssueIDs, v1) in.WantComma() } in.Delim(']') @@ -114,11 +114,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(out *jwriter.Writer, { const prefix string = ",\"securityStateIssueIds\":" out.RawString(prefix) - if in.SecurityStateIssueIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + if in.SecurityStateIssueIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v2, v3 := range in.SecurityStateIssueIds { + for v2, v3 := range in.SecurityStateIssueIDs { if v2 > 0 { out.RawByte(',') } diff --git a/security/types.go b/security/types.go index bbd9134b..4338db9c 100644 --- a/security/types.go +++ b/security/types.go @@ -209,7 +209,7 @@ type VisibleSecurityState struct { SecurityState State `json:"securityState"` // The security level of the page. CertificateSecurityState *CertificateSecurityState `json:"certificateSecurityState,omitempty"` // Security state details about the page certificate. SafetyTipInfo *SafetyTipInfo `json:"safetyTipInfo,omitempty"` // The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown. - SecurityStateIssueIds []string `json:"securityStateIssueIds"` // Array of security state issues ids. + SecurityStateIssueIDs []string `json:"securityStateIssueIds"` // Array of security state issues ids. } // StateExplanation an explanation of an factor contributing to the security diff --git a/target/easyjson.go b/target/easyjson.go index 2603a193..906d368a 100644 --- a/target/easyjson.go +++ b/target/easyjson.go @@ -801,22 +801,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget9(in *jlexer.Lexer, out case "browserContextIds": if in.IsNull() { in.Skip() - out.BrowserContextIds = nil + out.BrowserContextIDs = nil } else { in.Delim('[') - if out.BrowserContextIds == nil { + if out.BrowserContextIDs == nil { if !in.IsDelim(']') { - out.BrowserContextIds = make([]cdp.BrowserContextID, 0, 4) + out.BrowserContextIDs = make([]cdp.BrowserContextID, 0, 4) } else { - out.BrowserContextIds = []cdp.BrowserContextID{} + out.BrowserContextIDs = []cdp.BrowserContextID{} } } else { - out.BrowserContextIds = (out.BrowserContextIds)[:0] + out.BrowserContextIDs = (out.BrowserContextIDs)[:0] } for !in.IsDelim(']') { var v7 cdp.BrowserContextID v7 = cdp.BrowserContextID(in.String()) - out.BrowserContextIds = append(out.BrowserContextIds, v7) + out.BrowserContextIDs = append(out.BrowserContextIDs, v7) in.WantComma() } in.Delim(']') @@ -835,13 +835,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget9(out *jwriter.Writer, out.RawByte('{') first := true _ = first - if len(in.BrowserContextIds) != 0 { + if len(in.BrowserContextIDs) != 0 { const prefix string = ",\"browserContextIds\":" first = false out.RawString(prefix[1:]) { out.RawByte('[') - for v8, v9 := range in.BrowserContextIds { + for v8, v9 := range in.BrowserContextIDs { if v8 > 0 { out.RawByte(',') } diff --git a/target/target.go b/target/target.go index 9b097578..a7c7d3f8 100644 --- a/target/target.go +++ b/target/target.go @@ -258,14 +258,14 @@ func GetBrowserContexts() *GetBrowserContextsParams { // GetBrowserContextsReturns return values. type GetBrowserContextsReturns struct { - BrowserContextIds []cdp.BrowserContextID `json:"browserContextIds,omitempty"` // An array of browser context ids. + BrowserContextIDs []cdp.BrowserContextID `json:"browserContextIds,omitempty"` // An array of browser context ids. } // Do executes Target.getBrowserContexts against the provided context. // // returns: -// browserContextIds - An array of browser context ids. -func (p *GetBrowserContextsParams) Do(ctx context.Context) (browserContextIds []cdp.BrowserContextID, err error) { +// browserContextIDs - An array of browser context ids. +func (p *GetBrowserContextsParams) Do(ctx context.Context) (browserContextIDs []cdp.BrowserContextID, err error) { // execute var res GetBrowserContextsReturns err = cdp.Execute(ctx, CommandGetBrowserContexts, nil, &res) @@ -273,7 +273,7 @@ func (p *GetBrowserContextsParams) Do(ctx context.Context) (browserContextIds [] return nil, err } - return res.BrowserContextIds, nil + return res.BrowserContextIDs, nil } // CreateTargetParams creates a new page.