| 1 |
package performancetimeline |
| 2 |
|
| 3 |
// Code generated by cdproto-gen. DO NOT EDIT. |
| 4 |
|
| 5 |
import ( |
| 6 |
"github.com/chromedp/cdproto/cdp" |
| 7 |
"github.com/chromedp/cdproto/dom" |
| 8 |
) |
| 9 |
|
| 10 |
// LargestContentfulPaint see https://github.com/WICG/LargestContentfulPaint |
| 11 |
// and largest_contentful_paint.idl. |
| 12 |
// |
| 13 |
// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LargestContentfulPaint |
| 14 |
type LargestContentfulPaint struct { |
| 15 |
RenderTime *cdp.TimeSinceEpoch `json:"renderTime"` |
| 16 |
LoadTime *cdp.TimeSinceEpoch `json:"loadTime"` |
| 17 |
Size float64 `json:"size"` // The number of pixels being painted. |
| 18 |
ElementID string `json:"elementId,omitempty,omitzero"` // The id attribute of the element, if available. |
| 19 |
URL string `json:"url,omitempty,omitzero"` // The URL of the image (may be trimmed). |
| 20 |
NodeID cdp.BackendNodeID `json:"nodeId,omitempty,omitzero"` |
| 21 |
} |
| 22 |
|
| 23 |
// LayoutShiftAttribution [no description]. |
| 24 |
// |
| 25 |
// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LayoutShiftAttribution |
| 26 |
type LayoutShiftAttribution struct { |
| 27 |
PreviousRect *dom.Rect `json:"previousRect"` |
| 28 |
CurrentRect *dom.Rect `json:"currentRect"` |
| 29 |
NodeID cdp.BackendNodeID `json:"nodeId,omitempty,omitzero"` |
| 30 |
} |
| 31 |
|
| 32 |
// LayoutShift see |
| 33 |
// https://wicg.github.io/layout-instability/#sec-layout-shift and |
| 34 |
// layout_shift.idl. |
| 35 |
// |
| 36 |
// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LayoutShift |
| 37 |
type LayoutShift struct { |
| 38 |
Value float64 `json:"value"` // Score increment produced by this event. |
| 39 |
HadRecentInput bool `json:"hadRecentInput"` |
| 40 |
LastInputTime *cdp.TimeSinceEpoch `json:"lastInputTime"` |
| 41 |
Sources []*LayoutShiftAttribution `json:"sources"` |
| 42 |
} |
| 43 |
|
| 44 |
// TimelineEvent [no description]. |
| 45 |
// |
| 46 |
// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-TimelineEvent |
| 47 |
type TimelineEvent struct { |
| 48 |
FrameID cdp.FrameID `json:"frameId"` // Identifies the frame that this event is related to. Empty for non-frame targets. |
| 49 |
Type string `json:"type"` // The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional "details" fields is present. |
| 50 |
Name string `json:"name"` // Name may be empty depending on the type. |
| 51 |
Time *cdp.TimeSinceEpoch `json:"time"` // Time in seconds since Epoch, monotonically increasing within document lifetime. |
| 52 |
Duration float64 `json:"duration,omitempty,omitzero"` // Event duration, if applicable. |
| 53 |
LcpDetails *LargestContentfulPaint `json:"lcpDetails,omitempty,omitzero"` |
| 54 |
LayoutShiftDetails *LayoutShift `json:"layoutShiftDetails,omitempty,omitzero"` |
| 55 |
} |