CDPotion.Domain.PerformanceTimeline (cdpotion v0.1.4)

Summary

Functions

Previously buffered events would be reported before method returns. See also: timelineEventAdded

Types

Link to this type

largest_contentful_paint()

@type largest_contentful_paint() :: %{
  elementId: String.t() | nil,
  loadTime: CDPotion.Domain.Network.time_since_epoch(),
  nodeId: CDPotion.Domain.DOM.backend_node_id() | nil,
  renderTime: CDPotion.Domain.Network.time_since_epoch(),
  size: number(),
  url: String.t() | nil
}

See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl

Link to this type

layout_shift()

@type layout_shift() :: %{
  hadRecentInput: boolean(),
  lastInputTime: CDPotion.Domain.Network.time_since_epoch(),
  sources: [layout_shift_attribution()],
  value: number()
}

See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl

Link to this type

layout_shift_attribution()

@type layout_shift_attribution() :: %{
  currentRect: CDPotion.Domain.DOM.rect(),
  nodeId: CDPotion.Domain.DOM.backend_node_id() | nil,
  previousRect: CDPotion.Domain.DOM.rect()
}

description not provided :(

Link to this type

timeline_event()

@type timeline_event() :: %{
  duration: number() | nil,
  frameId: CDPotion.Domain.Page.frame_id(),
  layoutShiftDetails: layout_shift() | nil,
  lcpDetails: largest_contentful_paint() | nil,
  name: String.t(),
  time: CDPotion.Domain.Network.time_since_epoch(),
  type: String.t()
}

description not provided :(

Functions

Link to this function

enable(event_types)

@spec enable([String.t()]) :: {String.t(), map()}

Previously buffered events would be reported before method returns. See also: timelineEventAdded

Parameters: