performance_timeline
LargestContentfulPaint
dataclass
See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl
Source code in zendriver/cdp/performance_timeline.py
element_id: typing.Optional[str] = None
class-attribute
instance-attribute
load_time: network.TimeSinceEpoch
instance-attribute
node_id: typing.Optional[dom.BackendNodeId] = None
class-attribute
instance-attribute
render_time: network.TimeSinceEpoch
instance-attribute
size: float
instance-attribute
url: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(render_time, load_time, size, element_id=None, url=None, node_id=None)
from_json(json)
classmethod
Source code in zendriver/cdp/performance_timeline.py
to_json()
Source code in zendriver/cdp/performance_timeline.py
LayoutShift
dataclass
See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl
Source code in zendriver/cdp/performance_timeline.py
had_recent_input: bool
instance-attribute
last_input_time: network.TimeSinceEpoch
instance-attribute
sources: typing.List[LayoutShiftAttribution]
instance-attribute
value: float
instance-attribute
__init__(value, had_recent_input, last_input_time, sources)
from_json(json)
classmethod
Source code in zendriver/cdp/performance_timeline.py
to_json()
Source code in zendriver/cdp/performance_timeline.py
LayoutShiftAttribution
dataclass
Source code in zendriver/cdp/performance_timeline.py
current_rect: dom.Rect
instance-attribute
node_id: typing.Optional[dom.BackendNodeId] = None
class-attribute
instance-attribute
previous_rect: dom.Rect
instance-attribute
__init__(previous_rect, current_rect, node_id=None)
from_json(json)
classmethod
Source code in zendriver/cdp/performance_timeline.py
to_json()
Source code in zendriver/cdp/performance_timeline.py
TimelineEvent
dataclass
Source code in zendriver/cdp/performance_timeline.py
duration: typing.Optional[float] = None
class-attribute
instance-attribute
frame_id: page.FrameId
instance-attribute
layout_shift_details: typing.Optional[LayoutShift] = None
class-attribute
instance-attribute
lcp_details: typing.Optional[LargestContentfulPaint] = None
class-attribute
instance-attribute
name: str
instance-attribute
time: network.TimeSinceEpoch
instance-attribute
type_: str
instance-attribute
__init__(frame_id, type_, name, time, duration=None, lcp_details=None, layout_shift_details=None)
from_json(json)
classmethod
Source code in zendriver/cdp/performance_timeline.py
to_json()
Source code in zendriver/cdp/performance_timeline.py
TimelineEventAdded
dataclass
Sent when a performance timeline event is added. See reportPerformanceTimeline method.
Source code in zendriver/cdp/performance_timeline.py
enable(event_types)
Previously buffered events would be reported before method returns. See also: timelineEventAdded
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event_types
|
List[str]
|
The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported. |
required |