Audits Domain
Audits domain allows investigation of page violations and possible improvements.
Methods
Events
Types
Methods
Audits.checkContrast #
Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event.
parameters
- reportAAA
-
boolean
Whether to report WCAG AAA level issues. Default is false.
Audits.disable #
Disables issues domain, prevents further issues from being reported to the client.
Audits.enable #
Enables issues domain, sends the issues collected so far to the client by means of the
issueAdded
event.
Audits.getEncodedResponse #
Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
parameters
- requestId
-
Network.RequestId
Identifier of the network request to get content for.
- encoding
-
string
The encoding to use.
Allowed Values:webp
,jpeg
,png
- quality
-
number
The quality of the encoding (0-1). (defaults to 1)
- sizeOnly
-
boolean
Whether to only return the size information (defaults to false).
Return Object
- body
-
string
The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON)
- originalSize
-
integer
Size before re-encoding.
- encodedSize
-
integer
Size after re-encoding.
Events
Types
Audits.AffectedCookie #
Information about a cookie that is affected by an inspector issue.
Type: object
properties
- name
-
string
The following three properties uniquely identify a cookie
- path
-
string
- domain
-
string
Audits.AffectedFrame #
Information about the frame affected by an inspector issue.
Type: object
properties
- frameId
-
Page.FrameId
Audits.AffectedRequest #
Information about a request that is affected by an inspector issue.
Type: object
properties
- requestId
-
Network.RequestId
The unique request id.
- url
-
string
Audits.AttributionReportingIssueDetails #
Details for issues around "Attribution Reporting API" usage. Explainer: https://github.com/WICG/attribution-reporting-api
Type: object
properties
- violationType
-
AttributionReportingIssueType
- request
-
AffectedRequest
- violatingNodeId
-
DOM.BackendNodeId
- invalidParameter
-
string
Audits.AttributionReportingIssueType #
PermissionPolicyDisabled
, PermissionPolicyNotDelegated
, UntrustworthyReportingOrigin
, InsecureContext
, InvalidHeader
, InvalidRegisterTriggerHeader
, InvalidEligibleHeader
, TooManyConcurrentRequests
, SourceAndTriggerHeaders
, SourceIgnored
, TriggerIgnored
Type: string
Audits.BlockedByResponseIssueDetails #
Details for a request that has been blocked with the BLOCKED_BY_RESPONSE code. Currently only used for COEP/COOP, but may be extended to include some CSP errors in the future.
Type: object
properties
- request
-
AffectedRequest
- parentFrame
-
AffectedFrame
- blockedFrame
-
AffectedFrame
- reason
-
BlockedByResponseReason
Audits.BlockedByResponseReason #
Enum indicating the reason a response has been blocked. These reasons are refinements of the net error BLOCKED_BY_RESPONSE.
CoepFrameResourceNeedsCoepHeader
, CoopSandboxedIFrameCannotNavigateToCoopPage
, CorpNotSameOrigin
, CorpNotSameOriginAfterDefaultedToSameOriginByCoep
, CorpNotSameSite
Type: string
Audits.ClientHintIssueDetails #
This issue tracks client hints related issues. It's used to deprecate old features, encourage the use of new ones, and provide general guidance.
Type: object
properties
- sourceCodeLocation
-
SourceCodeLocation
- clientHintIssueReason
-
ClientHintIssueReason
Audits.ClientHintIssueReason #
MetaTagAllowListInvalidOrigin
, MetaTagModifiedHTML
Type: string
Audits.ContentSecurityPolicyIssueDetails #
Type: object
properties
- blockedURL
-
string
The url not included in allowed sources.
- violatedDirective
-
string
Specific directive that is violated, causing the CSP issue.
- isReportOnly
-
boolean
- contentSecurityPolicyViolationType
-
ContentSecurityPolicyViolationType
- frameAncestor
-
AffectedFrame
- sourceCodeLocation
-
SourceCodeLocation
- violatingNodeId
-
DOM.BackendNodeId
Audits.ContentSecurityPolicyViolationType #
kInlineViolation
, kEvalViolation
, kURLViolation
, kTrustedTypesSinkViolation
, kTrustedTypesPolicyViolation
, kWasmEvalViolation
Type: string
Audits.CookieExclusionReason #
ExcludeSameSiteUnspecifiedTreatedAsLax
, ExcludeSameSiteNoneInsecure
, ExcludeSameSiteLax
, ExcludeSameSiteStrict
, ExcludeInvalidSameParty
, ExcludeSamePartyCrossPartyContext
, ExcludeDomainNonASCII
, ExcludeThirdPartyCookieBlockedInFirstPartySet
Type: string
Audits.CookieIssueDetails #
This information is currently necessary, as the front-end has a difficult time finding a specific cookie. With this, we can convey specific error information without the cookie.
Type: object
properties
- cookie
-
AffectedCookie
If AffectedCookie is not set then rawCookieLine contains the raw Set-Cookie header string. This hints at a problem where the cookie line is syntactically or semantically malformed in a way that no valid cookie could be created.
- rawCookieLine
-
string
- cookieWarningReasons
-
array[ CookieWarningReason ]
- cookieExclusionReasons
-
array[ CookieExclusionReason ]
- operation
-
CookieOperation
Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context.
- siteForCookies
-
string
- cookieUrl
-
string
- request
-
AffectedRequest
Audits.CookieWarningReason #
WarnSameSiteUnspecifiedCrossSiteContext
, WarnSameSiteNoneInsecure
, WarnSameSiteUnspecifiedLaxAllowUnsafe
, WarnSameSiteStrictLaxDowngradeStrict
, WarnSameSiteStrictCrossDowngradeStrict
, WarnSameSiteStrictCrossDowngradeLax
, WarnSameSiteLaxCrossDowngradeStrict
, WarnSameSiteLaxCrossDowngradeLax
, WarnAttributeValueExceedsMaxSize
, WarnDomainNonASCII
Type: string
Audits.CorsIssueDetails #
Details for a CORS related issue, e.g. a warning or error related to CORS RFC1918 enforcement.
Type: object
properties
- corsErrorStatus
-
Network.CorsErrorStatus
- isWarning
-
boolean
- request
-
AffectedRequest
- location
-
SourceCodeLocation
- initiatorOrigin
-
string
- resourceIPAddressSpace
-
Network.IPAddressSpace
- clientSecurityState
-
Network.ClientSecurityState
Audits.DeprecationIssueDetails #
This issue tracks information needed to print a deprecation message. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md
Type: object
properties
- affectedFrame
-
AffectedFrame
- sourceCodeLocation
-
SourceCodeLocation
- type
-
DeprecationIssueType
Audits.DeprecationIssueType #
AuthorizationCoveredByWildcard
, CanRequestURLHTTPContainingNewline
, ChromeLoadTimesConnectionInfo
, ChromeLoadTimesFirstPaintAfterLoadTime
, ChromeLoadTimesWasAlternateProtocolAvailable
, CookieWithTruncatingChar
, CrossOriginAccessBasedOnDocumentDomain
, CrossOriginWindowAlert
, CrossOriginWindowConfirm
, CSSSelectorInternalMediaControlsOverlayCastButton
, DeprecationExample
, DocumentDomainSettingWithoutOriginAgentClusterHeader
, EventPath
, ExpectCTHeader
, GeolocationInsecureOrigin
, GeolocationInsecureOriginDeprecatedNotRemoved
, GetUserMediaInsecureOrigin
, HostCandidateAttributeGetter
, IdentityInCanMakePaymentEvent
, InsecurePrivateNetworkSubresourceRequest
, LocalCSSFileExtensionRejected
, MediaSourceAbortRemove
, MediaSourceDurationTruncatingBuffered
, NoSysexWebMIDIWithoutPermission
, NotificationInsecureOrigin
, NotificationPermissionRequestedIframe
, ObsoleteCreateImageBitmapImageOrientationNone
, ObsoleteWebRtcCipherSuite
, OpenWebDatabaseInsecureContext
, OverflowVisibleOnReplacedElement
, PaymentInstruments
, PaymentRequestCSPViolation
, PersistentQuotaType
, PictureSourceSrc
, PrefixedCancelAnimationFrame
, PrefixedRequestAnimationFrame
, PrefixedStorageInfo
, PrefixedVideoDisplayingFullscreen
, PrefixedVideoEnterFullscreen
, PrefixedVideoEnterFullScreen
, PrefixedVideoExitFullscreen
, PrefixedVideoExitFullScreen
, PrefixedVideoSupportsFullscreen
, PrivacySandboxExtensionsAPI
, RangeExpand
, RequestedSubresourceWithEmbeddedCredentials
, RTCConstraintEnableDtlsSrtpFalse
, RTCConstraintEnableDtlsSrtpTrue
, RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics
, RTCPeerConnectionSdpSemanticsPlanB
, RtcpMuxPolicyNegotiate
, SharedArrayBufferConstructedWithoutIsolation
, TextToSpeech_DisallowedByAutoplay
, V8SharedArrayBufferConstructedInExtensionWithoutIsolation
, XHRJSONEncodingDetection
, XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload
, XRSupportsSession
Type: string
Audits.FederatedAuthRequestIssueDetails #
Type: object
properties
- federatedAuthRequestIssueReason
-
FederatedAuthRequestIssueReason
Audits.FederatedAuthRequestIssueReason #
Represents the failure reason when a federated authentication reason fails. Should be updated alongside RequestIdTokenStatus in third_party/blink/public/mojom/devtools/inspector_issue.mojom to include all cases except for success.
ShouldEmbargo
, TooManyRequests
, WellKnownHttpNotFound
, WellKnownNoResponse
, WellKnownInvalidResponse
, WellKnownListEmpty
, ConfigNotInWellKnown
, WellKnownTooBig
, ConfigHttpNotFound
, ConfigNoResponse
, ConfigInvalidResponse
, ClientMetadataHttpNotFound
, ClientMetadataNoResponse
, ClientMetadataInvalidResponse
, DisabledInSettings
, ErrorFetchingSignin
, InvalidSigninResponse
, AccountsHttpNotFound
, AccountsNoResponse
, AccountsInvalidResponse
, AccountsListEmpty
, IdTokenHttpNotFound
, IdTokenNoResponse
, IdTokenInvalidResponse
, IdTokenInvalidRequest
, ErrorIdToken
, Canceled
, RpPageNotVisible
Type: string
Audits.GenericIssueDetails #
Depending on the concrete errorType, different properties are set.
Type: object
properties
- errorType
-
GenericIssueErrorType
Issues with the same errorType are aggregated in the frontend.
- frameId
-
Page.FrameId
- violatingNodeId
-
DOM.BackendNodeId
Audits.GenericIssueErrorType #
CrossOriginPortalPostMessageError
, FormLabelForNameError
, FormDuplicateIdForInputError
, FormInputWithNoLabelError
, FormAutocompleteAttributeEmptyError
, FormEmptyIdAndNameAttributesForInputError
Type: string
Audits.HeavyAdIssueDetails #
Type: object
properties
- resolution
-
HeavyAdResolutionStatus
The resolution status, either blocking the content or warning.
- reason
-
HeavyAdReason
The reason the ad was blocked, total network or cpu or peak cpu.
- frame
-
AffectedFrame
The frame that was blocked.
Audits.InspectorIssue #
An inspector issue reported from the back-end.
Type: object
properties
- code
-
InspectorIssueCode
- details
-
InspectorIssueDetails
- issueId
-
IssueId
A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.
Audits.InspectorIssueCode #
A unique identifier for the type of issue. Each type may use one of the optional fields in InspectorIssueDetails to convey more specific information about the kind of issue.
CookieIssue
, MixedContentIssue
, BlockedByResponseIssue
, HeavyAdIssue
, ContentSecurityPolicyIssue
, SharedArrayBufferIssue
, TrustedWebActivityIssue
, LowTextContrastIssue
, CorsIssue
, AttributionReportingIssue
, QuirksModeIssue
, NavigatorUserAgentIssue
, GenericIssue
, DeprecationIssue
, ClientHintIssue
, FederatedAuthRequestIssue
Type: string
Audits.InspectorIssueDetails #
This struct holds a list of optional fields with additional information specific to the kind of issue. When adding a new issue code, please also add a new optional field to this type.
Type: object
properties
- cookieIssueDetails
-
CookieIssueDetails
- mixedContentIssueDetails
-
MixedContentIssueDetails
- blockedByResponseIssueDetails
-
BlockedByResponseIssueDetails
- heavyAdIssueDetails
-
HeavyAdIssueDetails
- contentSecurityPolicyIssueDetails
-
ContentSecurityPolicyIssueDetails
- sharedArrayBufferIssueDetails
-
SharedArrayBufferIssueDetails
- twaQualityEnforcementDetails
-
TrustedWebActivityIssueDetails
- lowTextContrastIssueDetails
-
LowTextContrastIssueDetails
- corsIssueDetails
-
CorsIssueDetails
- attributionReportingIssueDetails
-
AttributionReportingIssueDetails
- quirksModeIssueDetails
-
QuirksModeIssueDetails
- navigatorUserAgentIssueDetails
-
NavigatorUserAgentIssueDetails
- genericIssueDetails
-
GenericIssueDetails
- deprecationIssueDetails
-
DeprecationIssueDetails
- clientHintIssueDetails
-
ClientHintIssueDetails
- federatedAuthRequestIssueDetails
-
FederatedAuthRequestIssueDetails
Audits.IssueId #
A unique id for a DevTools inspector issue. Allows other entities (e.g. exceptions, CDP message, console messages, etc.) to reference an issue.
Type: string
Audits.LowTextContrastIssueDetails #
Type: object
properties
- violatingNodeId
-
DOM.BackendNodeId
- violatingNodeSelector
-
string
- contrastRatio
-
number
- thresholdAA
-
number
- thresholdAAA
-
number
- fontSize
-
string
- fontWeight
-
string
Audits.MixedContentIssueDetails #
Type: object
properties
- resourceType
-
MixedContentResourceType
The type of resource causing the mixed content issue (css, js, iframe, form,...). Marked as optional because it is mapped to from blink::mojom::RequestContextType, which will be replaced by network::mojom::RequestDestination
- resolutionStatus
-
MixedContentResolutionStatus
The way the mixed content issue is being resolved.
- insecureURL
-
string
The unsafe http url causing the mixed content issue.
- mainResourceURL
-
string
The url responsible for the call to an unsafe url.
- request
-
AffectedRequest
The mixed content request. Does not always exist (e.g. for unsafe form submission urls).
- frame
-
AffectedFrame
Optional because not every mixed content issue is necessarily linked to a frame.
Audits.MixedContentResolutionStatus #
MixedContentBlocked
, MixedContentAutomaticallyUpgraded
, MixedContentWarning
Type: string
Audits.MixedContentResourceType #
AttributionSrc
, Audio
, Beacon
, CSPReport
, Download
, EventSource
, Favicon
, Font
, Form
, Frame
, Image
, Import
, Manifest
, Ping
, PluginData
, PluginResource
, Prefetch
, Resource
, Script
, ServiceWorker
, SharedWorker
, Stylesheet
, Track
, Video
, Worker
, XMLHttpRequest
, XSLT
Type: string
Audits.NavigatorUserAgentIssueDetails #
Type: object
properties
- url
-
string
- location
-
SourceCodeLocation
Audits.QuirksModeIssueDetails #
Details for issues about documents in Quirks Mode or Limited Quirks Mode that affects page layouting.
Type: object
properties
- isLimitedQuirksMode
-
boolean
If false, it means the document's mode is "quirks" instead of "limited-quirks".
- documentNodeId
-
DOM.BackendNodeId
- url
-
string
- frameId
-
Page.FrameId
- loaderId
-
Network.LoaderId
Audits.SharedArrayBufferIssueDetails #
Details for a issue arising from an SAB being instantiated in, or transferred to a context that is not cross-origin isolated.
Type: object
properties
- sourceCodeLocation
-
SourceCodeLocation
- isWarning
-
boolean
- type
-
SharedArrayBufferIssueType
Audits.SourceCodeLocation #
Type: object
properties
- scriptId
-
Runtime.ScriptId
- url
-
string
- lineNumber
-
integer
- columnNumber
-
integer
Audits.TrustedWebActivityIssueDetails #
Type: object
properties
- url
-
string
The url that triggers the violation.
- violationType
-
TwaQualityEnforcementViolationType
- httpStatusCode
-
integer
- packageName
-
string
The package name of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
- signature
-
string
The signature of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
Audits.TwaQualityEnforcementViolationType #
kHttpError
, kUnavailableOffline
, kDigitalAssetLinks
Type: string