diff --git a/core/lib/lh-error.js b/core/lib/lh-error.js
index 319a75a5a339..cc77e2fc0759 100644
--- a/core/lib/lh-error.js
+++ b/core/lib/lh-error.js
@@ -76,13 +76,13 @@ const UIStrings = {
criTimeout: 'Timeout waiting for initial Debugger Protocol connection.',
/**
* @description Error message explaining that a resource that was required for testing was never collected. "artifactName" will be replaced with the name of the resource that wasn't collected.
- * @example {WebAppManifest} artifactName
+ * @example {MainDocumentContent} artifactName
* */
missingRequiredArtifact: 'Required {artifactName} gatherer did not run.',
/**
* @description Error message explaining that there was an error while trying to collect a resource that was required for testing. "artifactName" will be replaced with the name of the resource that wasn't collected; "errorMessage" will be replaced with a string description of the error that occurred.
- * @example {WebAppManifest} artifactName
- * @example {Manifest invalid} errorMessage
+ * @example {MainDocumentContent} artifactName
+ * @example {Could not find main document} errorMessage
* */
erroredRequiredArtifact: 'Required {artifactName} gatherer encountered an error: {errorMessage}',
diff --git a/docs/plugins.md b/docs/plugins.md
index 271b8a2bf4cb..812fe75db59f 100644
--- a/docs/plugins.md
+++ b/docs/plugins.md
@@ -209,26 +209,26 @@ The primary objective of the audit function is to return a `score` from `0` to `
#### Available Artifacts
-The following artifacts are available for use in the audits of Lighthouse plugins. For more detailed information on their usage and purpose, see the [type information](https://github.com/GoogleChrome/lighthouse/blob/623b789497f6c87f85d366b4038deae5dc701c90/types/artifacts.d.ts#L20-L70).
+The following artifacts are available for use in the audits of Lighthouse plugins. For more detailed information on their usage and purpose, see the [type information](https://github.com/GoogleChrome/lighthouse/blob/main/types/artifacts.d.ts#L42-L99).
-- `DevtoolsLog`
- `fetchTime`
-- `settings`
-- `Trace`
- `BenchmarkIndex`
-- `ConsoleMessages`
+- `settings`
+- `Timing`
+- `HostFormFactor`
- `HostUserAgent`
+- `HostProduct`
+- `GatherContext`
+- `URL`
+- `ConsoleMessages`
+- `DevtoolsLog`
+- `MainDocumentContent`
- `ImageElements`
- `LinkElements`
- `MetaElements`
-- `NetworkUserAgent`
-- `RuntimeExceptions`
-- `ScriptElements`
-- `Stacks`
-- `Timing`
-- `URL`
+- `Scripts`
+- `Trace`
- `ViewportDimensions`
-- `WebAppManifest`
While Lighthouse has more artifacts with information about the page than are in this list, those artifacts are considered experimental and their structure or existence could change at any time. Only use artifacts not on the list above if you are comfortable living on the bleeding edge and can tolerate unannounced breaking changes.
diff --git a/types/artifacts.d.ts b/types/artifacts.d.ts
index 77280dbcbed5..c84f5cb4ff8d 100644
--- a/types/artifacts.d.ts
+++ b/types/artifacts.d.ts
@@ -80,18 +80,20 @@ interface ContextualBaseArtifacts {
interface PublicGathererArtifacts {
/** ConsoleMessages deprecation and intervention warnings, console API calls, and exceptions logged by Chrome during page load. */
ConsoleMessages: Artifacts.ConsoleMessage[];
- /** All the iframe elements in the page. */
- IFrameElements: Artifacts.IFrameElement[];
- /** The contents of the main HTML document network resource. */
- MainDocumentContent: string;
+ /** The primary log of devtools protocol activity. */
+ DevtoolsLog: DevtoolsLog;
/** Information on size and loading for all the images in the page. Natural size information for `picture` and CSS images is only available if the image was one of the largest 50 images. */
ImageElements: Artifacts.ImageElement[];
/** All the link elements on the page or equivalently declared in `Link` headers. @see https://html.spec.whatwg.org/multipage/links.html */
LinkElements: Artifacts.LinkElement[];
+ /** The contents of the main HTML document network resource. */
+ MainDocumentContent: string;
/** The values of the elements in the head. */
MetaElements: Array<{name?: string, content?: string, property?: string, httpEquiv?: string, charset?: string, node: Artifacts.NodeDetails}>;
/** Information on all scripts in the page. */
Scripts: Artifacts.Script[];
+ /** The primary trace taken over the entire run. */
+ Trace: Trace;
/** The dimensions and devicePixelRatio of the loaded viewport. */
ViewportDimensions: Artifacts.ViewportDimensions;
}
@@ -111,8 +113,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
CacheContents: string[];
/** CSS coverage information for styles used by page's final state. */
CSSUsage: {rules: Crdp.CSS.RuleUsage[], stylesheets: Artifacts.CSSStyleSheetInfo[]};
- /** The primary log of devtools protocol activity. */
- DevtoolsLog: DevtoolsLog;
/** The log of devtools protocol activity if there was a page load error and Chrome navigated to a `chrome-error://` page. */
DevtoolsLogError: DevtoolsLog;
/** Information on the document's doctype(or null if not present), specifically the name, publicId, and systemId.
@@ -122,12 +122,12 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
DOMStats: Artifacts.DOMStats;
/** Information on poorly sized font usage and the text affected by it. */
FontSize: Artifacts.FontSize;
+ /** All the iframe elements in the page. */
+ IFrameElements: Artifacts.IFrameElement[];
/** All the input elements, including associated form and label elements. */
Inputs: {inputs: Artifacts.InputElement[]; forms: Artifacts.FormElement[]; labels: Artifacts.LabelElement[]};
/** Screenshot of the entire page (rather than just the above the fold content). */
FullPageScreenshot: LHResult.FullPageScreenshot | null;
- /** Information about event listeners registered on the global object. */
- GlobalListeners: Array;
/** The issues surfaced in the devtools Issues panel */
InspectorIssues: Artifacts.InspectorIssues;
/** JS coverage information for code used during audit. Keyed by script id. */
@@ -149,10 +149,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
SourceMaps: Array;
/** Information on detected tech stacks (e.g. JS libraries) used by the page. */
Stacks: Artifacts.DetectedStack[];
- /** Information about tap targets including their position and size. */
- TapTargets: Artifacts.TapTarget[];
- /** The primary trace taken over the entire run. */
- Trace: Trace;
/** The trace if there was a page load error and Chrome navigated to a `chrome-error://` page. */
TraceError: Trace;
/** Elements associated with metrics (ie: Largest Contentful Paint element). */
@@ -188,6 +184,8 @@ declare module Artifacts {
finalDisplayedUrl: string;
}
+ type Rect = AuditDetails.Rect;
+
interface NodeDetails {
lhId: string,
devtoolsNodePath: string,
@@ -293,19 +291,6 @@ declare module Artifacts {
content?: string;
}
- interface ScriptElement {
- type: string | null
- src: string | null
- /** The `id` property of the script element; null if it had no `id` or if `source` is 'network'. */
- id: string | null
- async: boolean
- defer: boolean
- /** Details for node in DOM for the script element */
- node: NodeDetails | null
- /** Where the script was discovered, either in the head, the body, or network records. */
- source: 'head'|'body'|'network'
- }
-
/** @see https://sourcemaps.info/spec.html#h.qz3o9nc69um5 */
type RawSourceMap = {
/** File version and must be a positive integer. */
@@ -518,14 +503,6 @@ declare module Artifacts {
resourceSize: number;
}
- type Rect = AuditDetails.Rect;
-
- interface TapTarget {
- node: NodeDetails;
- href: string;
- clientRects: Rect[];
- }
-
interface TraceElement {
traceEventType: 'largest-contentful-paint'|'layout-shift'|'animation'|'responsiveness';
node: NodeDetails;
@@ -800,18 +777,6 @@ declare module Artifacts {
node: NodeDetails;
}
- /** Information about an event listener registered on the global object. */
- interface GlobalListener {
- /** Event listener type, limited to those events currently of interest. */
- type: 'pagehide'|'unload'|'visibilitychange';
- /** The DevTools protocol script identifier. */
- scriptId: string;
- /** Line number in the script (0-based). */
- lineNumber: number;
- /** Column number in the script (0-based). */
- columnNumber: number;
- }
-
/** Describes a generic console message. */
interface BaseConsoleMessage {
/**