Audits Domain
Audits domain allows investigation of page violations and possible improvements.
Methods
Events
Types
- Audits.AffectedCookie
- Audits.AffectedFrame
- Audits.AffectedRequest
- Audits.AttributionReportingIssueDetails
- Audits.AttributionReportingIssueType
- Audits.BlockedByResponseIssueDetails
- Audits.BlockedByResponseReason
- Audits.BounceTrackingIssueDetails
- Audits.ClientHintIssueDetails
- Audits.ClientHintIssueReason
- Audits.ContentSecurityPolicyIssueDetails
- Audits.ContentSecurityPolicyViolationType
- Audits.CookieDeprecationMetadataIssueDetails
- Audits.CookieExclusionReason
- Audits.CookieIssueDetails
- Audits.CookieIssueInsight
- Audits.CookieOperation
- Audits.CookieWarningReason
- Audits.CorsIssueDetails
- Audits.DeprecationIssueDetails
- Audits.ElementAccessibilityIssueDetails
- Audits.ElementAccessibilityIssueReason
- Audits.FailedRequestInfo
- Audits.FederatedAuthRequestIssueDetails
- Audits.FederatedAuthRequestIssueReason
- Audits.FederatedAuthUserInfoRequestIssueDetails
- Audits.FederatedAuthUserInfoRequestIssueReason
- Audits.GenericIssueDetails
- Audits.GenericIssueErrorType
- Audits.HeavyAdIssueDetails
- Audits.HeavyAdReason
- Audits.HeavyAdResolutionStatus
- Audits.InsightType
- Audits.InspectorIssue
- Audits.InspectorIssueCode
- Audits.InspectorIssueDetails
- Audits.IssueId
- Audits.LowTextContrastIssueDetails
- Audits.MixedContentIssueDetails
- Audits.MixedContentResolutionStatus
- Audits.MixedContentResourceType
- Audits.PartitioningBlobURLInfo
- Audits.PartitioningBlobURLIssueDetails
- Audits.PropertyRuleIssueDetails
- Audits.PropertyRuleIssueReason
- Audits.QuirksModeIssueDetails
- Audits.SharedArrayBufferIssueDetails
- Audits.SharedArrayBufferIssueType
- Audits.SharedDictionaryError
- Audits.SharedDictionaryIssueDetails
- Audits.SourceCodeLocation
- Audits.SRIMessageSignatureError
- Audits.SRIMessageSignatureIssueDetails
- Audits.StylesheetLoadingIssueDetails
- Audits.StyleSheetLoadingIssueReason
- Audits.UnencodedDigestError
- Audits.UnencodedDigestIssueDetails
- Audits.UserReidentificationIssueDetails
- Audits.UserReidentificationIssueType
- Audits.NavigatorUserAgentIssueDetails Deprecated
Methods
Audits.checkContrast #
Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event.
Parameters
reportAAAOptional
booleanWhether to report WCAG AAA level issues. Default is false.
Audits.checkFormsIssues #
Runs the form issues check for the target page. Found issues are reported using Audits.issueAdded event.
Return object
formIssues array[ GenericIssueDetails ]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 Identifier of the network request to get content for.
encoding stringThe encoding to use.
Allowed values: webp, jpeg, png
qualityOptional
numberThe quality of the encoding (0-1). (defaults to 1)
sizeOnlyOptional
booleanWhether to only return the size information (defaults to false).
Return object
bodyOptional
stringThe encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON)
originalSize integerSize before re-encoding.
encodedSize integerSize after re-encoding.
Events
Types
Audits.AffectedCookie #
Information about a cookie that is affected by an inspector issue.
Type: object
Properties
name stringThe following three properties uniquely identify a cookie
path stringdomain stringAudits.AffectedFrame #
Information about the frame affected by an inspector issue.
Type: object
Properties
frameId Audits.AffectedRequest #
Information about a request that is affected by an inspector issue.
Type: object
Properties
requestIdOptional
The unique request id.
url stringAudits.AttributionReportingIssueDetails #
Details for issues around "Attribution Reporting API" usage. Explainer: https://github.com/WICG/attribution-reporting-api
Type: object
Properties
violationType requestOptional
violatingNodeIdOptional
invalidParameterOptional
stringAudits.AttributionReportingIssueType #
Type: string
Allowed values: PermissionPolicyDisabled, UntrustworthyReportingOrigin, InsecureContext, InvalidHeader, InvalidRegisterTriggerHeader, SourceAndTriggerHeaders, SourceIgnored, TriggerIgnored, OsSourceIgnored, OsTriggerIgnored, InvalidRegisterOsSourceHeader, InvalidRegisterOsTriggerHeader, WebAndOsHeaders, NoWebOrOsSupport, NavigationRegistrationWithoutTransientUserActivation, InvalidInfoHeader, NoRegisterSourceHeader, NoRegisterTriggerHeader, NoRegisterOsSourceHeader, NoRegisterOsTriggerHeader, NavigationRegistrationUniqueScopeAlreadySet
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 parentFrameOptional
blockedFrameOptional
reason Audits.BlockedByResponseReason #
Enum indicating the reason a response has been blocked. These reasons are refinements of the net error BLOCKED_BY_RESPONSE.
Type: string
Allowed values: CoepFrameResourceNeedsCoepHeader, CoopSandboxedIFrameCannotNavigateToCoopPage, CorpNotSameOrigin, CorpNotSameOriginAfterDefaultedToSameOriginByCoep, CorpNotSameOriginAfterDefaultedToSameOriginByDip, CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip, CorpNotSameSite, SRIMessageSignatureMismatch
Audits.BounceTrackingIssueDetails #
This issue warns about sites in the redirect chain of a finished navigation
that may be flagged as trackers and have their state cleared if they don't
receive a user interaction. Note that in this context 'site' means eTLD+1.
For example, if the URL https://example.test:80/bounce was in the
redirect chain, the site reported would be example.test.
Type: object
Properties
trackingSites array[ 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 clientHintIssueReason Audits.ClientHintIssueReason #
Type: string
Allowed values: MetaTagAllowListInvalidOrigin, MetaTagModifiedHTML
Audits.ContentSecurityPolicyIssueDetails #
Type: object
Properties
blockedURLOptional
stringThe url not included in allowed sources.
violatedDirective stringSpecific directive that is violated, causing the CSP issue.
isReportOnly booleancontentSecurityPolicyViolationType frameAncestorOptional
sourceCodeLocationOptional
violatingNodeIdOptional
Audits.ContentSecurityPolicyViolationType #
Type: string
Allowed values: kInlineViolation, kEvalViolation, kURLViolation, kSRIViolation, kTrustedTypesSinkViolation, kTrustedTypesPolicyViolation, kWasmEvalViolation
Audits.CookieDeprecationMetadataIssueDetails #
This issue warns about third-party sites that are accessing cookies on the
current page, and have been permitted due to having a global metadata grant.
Note that in this context 'site' means eTLD+1. For example, if the URL
https://example.test:80/web_page was accessing cookies, the site reported
would be example.test.
Type: object
Properties
allowedSites array[ string ]optOutPercentage numberisOptOutTopLevel booleanoperation Audits.CookieExclusionReason #
Type: string
Allowed values: ExcludeSameSiteUnspecifiedTreatedAsLax, ExcludeSameSiteNoneInsecure, ExcludeSameSiteLax, ExcludeSameSiteStrict, ExcludeInvalidSameParty, ExcludeSamePartyCrossPartyContext, ExcludeDomainNonASCII, ExcludeThirdPartyCookieBlockedInFirstPartySet, ExcludeThirdPartyPhaseout, ExcludePortMismatch, ExcludeSchemeMismatch
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
cookieOptional
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.
rawCookieLineOptional
stringcookieWarningReasons array[ CookieWarningReason ]cookieExclusionReasons array[ CookieExclusionReason ]operation Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context.
siteForCookiesOptional
stringcookieUrlOptional
stringrequestOptional
insightOptional
The recommended solution to the issue.
Audits.CookieIssueInsight #
Information about the suggested solution to a cookie issue.
Type: object
Properties
type tableEntryUrlOptional
stringLink to table entry in third-party cookie migration readiness list.
Audits.CookieWarningReason #
Type: string
Allowed values: WarnSameSiteUnspecifiedCrossSiteContext, WarnSameSiteNoneInsecure, WarnSameSiteUnspecifiedLaxAllowUnsafe, WarnSameSiteStrictLaxDowngradeStrict, WarnSameSiteStrictCrossDowngradeStrict, WarnSameSiteStrictCrossDowngradeLax, WarnSameSiteLaxCrossDowngradeStrict, WarnSameSiteLaxCrossDowngradeLax, WarnAttributeValueExceedsMaxSize, WarnDomainNonASCII, WarnThirdPartyPhaseout, WarnCrossSiteRedirectDowngradeChangesInclusion, WarnDeprecationTrialMetadata, WarnThirdPartyCookieHeuristic
Audits.CorsIssueDetails #
Details for a CORS related issue, e.g. a warning or error related to CORS RFC1918 enforcement.
Type: object
Properties
corsErrorStatus isWarning booleanrequest locationOptional
initiatorOriginOptional
stringresourceIPAddressSpaceOptional
clientSecurityStateOptional
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
affectedFrameOptional
sourceCodeLocation type stringOne of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
Audits.ElementAccessibilityIssueDetails #
This issue warns about errors in the select or summary element content model.
Type: object
Properties
nodeId elementAccessibilityIssueReason hasDisallowedAttributes booleanAudits.ElementAccessibilityIssueReason #
Type: string
Allowed values: DisallowedSelectChild, DisallowedOptGroupChild, NonPhrasingContentOptionChild, InteractiveContentOptionChild, InteractiveContentLegendChild, InteractiveContentSummaryDescendant
Audits.FailedRequestInfo #
Type: object
Properties
url stringThe URL that failed to load.
failureMessage stringThe failure message for the failed request.
requestIdOptional
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.
Type: string
Allowed values: ShouldEmbargo, TooManyRequests, WellKnownHttpNotFound, WellKnownNoResponse, WellKnownInvalidResponse, WellKnownListEmpty, WellKnownInvalidContentType, ConfigNotInWellKnown, WellKnownTooBig, ConfigHttpNotFound, ConfigNoResponse, ConfigInvalidResponse, ConfigInvalidContentType, ClientMetadataHttpNotFound, ClientMetadataNoResponse, ClientMetadataInvalidResponse, ClientMetadataInvalidContentType, IdpNotPotentiallyTrustworthy, DisabledInSettings, DisabledInFlags, ErrorFetchingSignin, InvalidSigninResponse, AccountsHttpNotFound, AccountsNoResponse, AccountsInvalidResponse, AccountsListEmpty, AccountsInvalidContentType, IdTokenHttpNotFound, IdTokenNoResponse, IdTokenInvalidResponse, IdTokenIdpErrorResponse, IdTokenCrossSiteIdpErrorResponse, IdTokenInvalidRequest, IdTokenInvalidContentType, ErrorIdToken, Canceled, RpPageNotVisible, SilentMediationFailure, ThirdPartyCookiesBlocked, NotSignedInWithIdp, MissingTransientUserActivation, ReplacedByActiveMode, InvalidFieldsSpecified, RelyingPartyOriginIsOpaque, TypeNotMatching, UiDismissedNoEmbargo, CorsError, SuppressedBySegmentationPlatform
Audits.FederatedAuthUserInfoRequestIssueDetails #
Type: object
Properties
federatedAuthUserInfoRequestIssueReason Audits.FederatedAuthUserInfoRequestIssueReason #
Represents the failure reason when a getUserInfo() call fails. Should be updated alongside FederatedAuthUserInfoRequestResult in third_party/blink/public/mojom/devtools/inspector_issue.mojom.
Type: string
Allowed values: NotSameOrigin, NotIframe, NotPotentiallyTrustworthy, NoApiPermission, NotSignedInWithIdp, NoAccountSharingPermission, InvalidConfigOrWellKnown, InvalidAccountsResponse, NoReturningUserFromFetchedAccounts
Audits.GenericIssueDetails #
Depending on the concrete errorType, different properties are set.
Type: object
Properties
errorType Issues with the same errorType are aggregated in the frontend.
frameIdOptional
violatingNodeIdOptional
violatingNodeAttributeOptional
stringrequestOptional
Audits.GenericIssueErrorType #
Type: string
Allowed values: FormLabelForNameError, FormDuplicateIdForInputError, FormInputWithNoLabelError, FormAutocompleteAttributeEmptyError, FormEmptyIdAndNameAttributesForInputError, FormAriaLabelledByToNonExistingId, FormInputAssignedAutocompleteValueToIdOrNameAttributeError, FormLabelHasNeitherForNorNestedInput, FormLabelForMatchesNonExistingIdError, FormInputHasWrongButWellIntendedAutocompleteValueError, ResponseWasBlockedByORB
Audits.HeavyAdIssueDetails #
Type: object
Properties
resolution The resolution status, either blocking the content or warning.
reason The reason the ad was blocked, total network or cpu or peak cpu.
frame The frame that was blocked.
Audits.InsightType #
Represents the category of insight that a cookie issue falls under.
Type: string
Allowed values: GitHubResource, GracePeriod, Heuristics
Audits.InspectorIssue #
An inspector issue reported from the back-end.
Type: object
Properties
code details issueIdOptional
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.
Type: string
Allowed values: CookieIssue, MixedContentIssue, BlockedByResponseIssue, HeavyAdIssue, ContentSecurityPolicyIssue, SharedArrayBufferIssue, LowTextContrastIssue, CorsIssue, AttributionReportingIssue, QuirksModeIssue, PartitioningBlobURLIssue, NavigatorUserAgentIssue, GenericIssue, DeprecationIssue, ClientHintIssue, FederatedAuthRequestIssue, BounceTrackingIssue, CookieDeprecationMetadataIssue, StylesheetLoadingIssue, FederatedAuthUserInfoRequestIssue, PropertyRuleIssue, SharedDictionaryIssue, ElementAccessibilityIssue, SRIMessageSignatureIssue, UnencodedDigestIssue, UserReidentificationIssue
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
cookieIssueDetailsOptional
mixedContentIssueDetailsOptional
blockedByResponseIssueDetailsOptional
heavyAdIssueDetailsOptional
contentSecurityPolicyIssueDetailsOptional
sharedArrayBufferIssueDetailsOptional
lowTextContrastIssueDetailsOptional
corsIssueDetailsOptional
attributionReportingIssueDetailsOptional
quirksModeIssueDetailsOptional
partitioningBlobURLIssueDetailsOptional
navigatorUserAgentIssueDetailsOptional
genericIssueDetailsOptional
deprecationIssueDetailsOptional
clientHintIssueDetailsOptional
federatedAuthRequestIssueDetailsOptional
bounceTrackingIssueDetailsOptional
cookieDeprecationMetadataIssueDetailsOptional
stylesheetLoadingIssueDetailsOptional
propertyRuleIssueDetailsOptional
federatedAuthUserInfoRequestIssueDetailsOptional
sharedDictionaryIssueDetailsOptional
elementAccessibilityIssueDetailsOptional
sriMessageSignatureIssueDetailsOptional
unencodedDigestIssueDetailsOptional
userReidentificationIssueDetailsOptional
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 violatingNodeSelector stringcontrastRatio numberthresholdAA numberthresholdAAA numberfontSize stringfontWeight stringAudits.MixedContentIssueDetails #
Type: object
Properties
resourceTypeOptional
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 The way the mixed content issue is being resolved.
insecureURL stringThe unsafe http url causing the mixed content issue.
mainResourceURL stringThe url responsible for the call to an unsafe url.
requestOptional
The mixed content request. Does not always exist (e.g. for unsafe form submission urls).
frameOptional
Optional because not every mixed content issue is necessarily linked to a frame.
Audits.MixedContentResolutionStatus #
Type: string
Allowed values: MixedContentBlocked, MixedContentAutomaticallyUpgraded, MixedContentWarning
Audits.MixedContentResourceType #
Type: string
Allowed values: AttributionSrc, Audio, Beacon, CSPReport, Download, EventSource, Favicon, Font, Form, Frame, Image, Import, JSON, Manifest, Ping, PluginData, PluginResource, Prefetch, Resource, Script, ServiceWorker, SharedWorker, SpeculationRules, Stylesheet, Track, Video, Worker, XMLHttpRequest, XSLT
Audits.PartitioningBlobURLInfo #
Type: string
Allowed values: BlockedCrossPartitionFetching, EnforceNoopenerForNavigation
Audits.PartitioningBlobURLIssueDetails #
Type: object
Properties
url stringThe BlobURL that failed to load.
partitioningBlobURLInfo Additional information about the Partitioning Blob URL issue.
Audits.PropertyRuleIssueDetails #
This issue warns about errors in property rules that lead to property registrations being ignored.
Type: object
Properties
sourceCodeLocation Source code position of the property rule.
propertyRuleIssueReason Reason why the property rule was discarded.
propertyValueOptional
stringThe value of the property rule property that failed to parse
Audits.PropertyRuleIssueReason #
Type: string
Allowed values: InvalidSyntax, InvalidInitialValue, InvalidInherits, InvalidName
Audits.QuirksModeIssueDetails #
Details for issues about documents in Quirks Mode or Limited Quirks Mode that affects page layouting.
Type: object
Properties
isLimitedQuirksMode booleanIf false, it means the document's mode is "quirks" instead of "limited-quirks".
documentNodeId url stringframeId 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 isWarning booleanAudits.SharedDictionaryError #
Type: string
Allowed values: UseErrorCrossOriginNoCorsRequest, UseErrorDictionaryLoadFailure, UseErrorMatchingDictionaryNotUsed, UseErrorUnexpectedContentDictionaryHeader, WriteErrorCossOriginNoCorsRequest, WriteErrorDisallowedBySettings, WriteErrorExpiredResponse, WriteErrorFeatureDisabled, WriteErrorInsufficientResources, WriteErrorInvalidMatchField, WriteErrorInvalidStructuredHeader, WriteErrorInvalidTTLField, WriteErrorNavigationRequest, WriteErrorNoMatchField, WriteErrorNonIntegerTTLField, WriteErrorNonListMatchDestField, WriteErrorNonSecureContext, WriteErrorNonStringIdField, WriteErrorNonStringInMatchDestList, WriteErrorNonStringMatchField, WriteErrorNonTokenTypeField, WriteErrorRequestAborted, WriteErrorShuttingDown, WriteErrorTooLongIdField, WriteErrorUnsupportedType
Audits.SourceCodeLocation #
Type: object
Properties
scriptIdOptional
url stringlineNumber integercolumnNumber integerAudits.SRIMessageSignatureError #
Type: string
Allowed values: MissingSignatureHeader, MissingSignatureInputHeader, InvalidSignatureHeader, InvalidSignatureInputHeader, SignatureHeaderValueIsNotByteSequence, SignatureHeaderValueIsParameterized, SignatureHeaderValueIsIncorrectLength, SignatureInputHeaderMissingLabel, SignatureInputHeaderValueNotInnerList, SignatureInputHeaderValueMissingComponents, SignatureInputHeaderInvalidComponentType, SignatureInputHeaderInvalidComponentName, SignatureInputHeaderInvalidHeaderComponentParameter, SignatureInputHeaderInvalidDerivedComponentParameter, SignatureInputHeaderKeyIdLength, SignatureInputHeaderInvalidParameter, SignatureInputHeaderMissingRequiredParameters, ValidationFailedSignatureExpired, ValidationFailedInvalidLength, ValidationFailedSignatureMismatch, ValidationFailedIntegrityMismatch
Audits.SRIMessageSignatureIssueDetails #
Type: object
Properties
error signatureBase stringintegrityAssertions array[ string ]request Audits.StylesheetLoadingIssueDetails #
This issue warns when a referenced stylesheet couldn't be loaded.
Type: object
Properties
sourceCodeLocation Source code position that referenced the failing stylesheet.
styleSheetLoadingIssueReason Reason why the stylesheet couldn't be loaded.
failedRequestInfoOptional
Contains additional info when the failure was due to a request.
Audits.UnencodedDigestError #
Type: string
Allowed values: MalformedDictionary, UnknownAlgorithm, IncorrectDigestType, IncorrectDigestLength
Audits.UserReidentificationIssueDetails #
This issue warns about uses of APIs that may be considered misuse to re-identify users.
Type: object
Properties
requestOptional
Applies to BlockedFrameNavigation and BlockedSubresource issue types.
sourceCodeLocationOptional
Applies to NoisedCanvasReadback issue type.
Audits.UserReidentificationIssueType #
Type: string
Allowed values: BlockedFrameNavigation, BlockedSubresource, NoisedCanvasReadback