clj-chrome-devtools.commands.audits
Audits domain allows investigation of page violations and possible improvements.
check-contrast
(check-contrast)
(check-contrast {:as params, :keys [report-aaa]})
(check-contrast connection {:as params, :keys [report-aaa]})
Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event.
Parameters map keys:
Key | Description |
---|---|
:report-aaa | Whether to report WCAG AAA level issues. Default is false. (optional) |
disable
(disable)
(disable {:as params, :keys []})
(disable connection {:as params, :keys []})
Disables issues domain, prevents further issues from being reported to the client.
enable
(enable)
(enable {:as params, :keys []})
(enable connection {:as params, :keys []})
Enables issues domain, sends the issues collected so far to the client by means of the issueAdded
event.
get-encoded-response
(get-encoded-response)
(get-encoded-response {:as params, :keys [request-id encoding quality size-only]})
(get-encoded-response connection {:as params, :keys [request-id encoding quality size-only]})
Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
Parameters map keys:
Key | Description |
---|---|
:request-id | Identifier of the network request to get content for. |
:encoding | The encoding to use. |
:quality | The quality of the encoding (0-1). (defaults to 1) (optional) |
:size-only | Whether to only return the size information (defaults to false). (optional) |
Return map keys:
Key | Description |
---|---|
:body | The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON) (optional) |
:original-size | Size before re-encoding. |
:encoded-size | Size after re-encoding. |