mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Update chromedp to fix console errors (#1521)
This commit is contained in:
28
vendor/github.com/chromedp/cdproto/audits/audits.go
generated
vendored
28
vendor/github.com/chromedp/cdproto/audits/audits.go
generated
vendored
@@ -118,9 +118,37 @@ func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnable, nil, nil)
|
||||
}
|
||||
|
||||
// CheckContrastParams runs the contrast check for the target page. Found
|
||||
// issues are reported using Audits.issueAdded event.
|
||||
type CheckContrastParams struct {
|
||||
ReportAAA bool `json:"reportAAA,omitempty"` // Whether to report WCAG AAA level issues. Default is false.
|
||||
}
|
||||
|
||||
// CheckContrast runs the contrast check for the target page. Found issues
|
||||
// are reported using Audits.issueAdded event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-checkContrast
|
||||
//
|
||||
// parameters:
|
||||
func CheckContrast() *CheckContrastParams {
|
||||
return &CheckContrastParams{}
|
||||
}
|
||||
|
||||
// WithReportAAA whether to report WCAG AAA level issues. Default is false.
|
||||
func (p CheckContrastParams) WithReportAAA(reportAAA bool) *CheckContrastParams {
|
||||
p.ReportAAA = reportAAA
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Audits.checkContrast against the provided context.
|
||||
func (p *CheckContrastParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandCheckContrast, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandGetEncodedResponse = "Audits.getEncodedResponse"
|
||||
CommandDisable = "Audits.disable"
|
||||
CommandEnable = "Audits.enable"
|
||||
CommandCheckContrast = "Audits.checkContrast"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user