Tungsten v0.1.0 Tungsten.CDP.BackgroundService View Source
Defines events for background web platform features.
Link to this section Summary
Link to this section Types
Link to this type
cdp_background_service_event_type()
View Source
cdp_background_service_event_type()
View Source
cdp_background_service_event_type() :: %{
timestamp: Tungsten.CDP.Network.cdp_time_since_epoch_type(),
origin: String.t(),
service_worker_registration_id:
Tungsten.CDP.ServiceWorker.cdp_registration_id_type(),
service: cdp_service_name_type(),
event_name: String.t(),
instance_id: String.t(),
event_metadata: [cdp_event_metadata_type()]
}
cdp_background_service_event_type() :: %{
timestamp: Tungsten.CDP.Network.cdp_time_since_epoch_type(),
origin: String.t(),
service_worker_registration_id:
Tungsten.CDP.ServiceWorker.cdp_registration_id_type(),
service: cdp_service_name_type(),
event_name: String.t(),
instance_id: String.t(),
event_metadata: [cdp_event_metadata_type()]
}
BackgroundService.BackgroundServiceEvent
This type has no documentation
Link to this type
cdp_event_metadata_type() View Source
BackgroundService.EventMetadata
A key-value pair for additional event information to pass along.
Link to this type
cdp_service_name_type()
View Source
cdp_service_name_type()
View Source
cdp_service_name_type() :: :background_sync | :background_fetch
cdp_service_name_type() :: :background_sync | :background_fetch
The Background Service that will be associated with the commands/events. Every Background Service operates independently, but they share the same API.
Link to this section Functions
Link to this function
clear_events(session, parameters, options \\ [])
View Source
clear_events(session, parameters, options \\ [])
View Source
clear_events(
GenServer.server(),
%{service: cdp_service_name_type()},
Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}
clear_events( GenServer.server(), %{service: cdp_service_name_type()}, Tungsten.Connection.exec_options() ) :: {:ok, map()} | {:error, term()}
Clears all stored data for the service.
Link to this function
set_recording(session, parameters, options \\ [])
View Source
set_recording(session, parameters, options \\ [])
View Source
set_recording(
GenServer.server(),
%{should_record: boolean(), service: cdp_service_name_type()},
Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}
set_recording( GenServer.server(), %{should_record: boolean(), service: cdp_service_name_type()}, Tungsten.Connection.exec_options() ) :: {:ok, map()} | {:error, term()}
BackgroundService.setRecording
Set the recording state for the service.
Link to this function
start_observing(session, parameters, options \\ [])
View Source
start_observing(session, parameters, options \\ [])
View Source
start_observing(
GenServer.server(),
%{service: cdp_service_name_type()},
Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}
start_observing( GenServer.server(), %{service: cdp_service_name_type()}, Tungsten.Connection.exec_options() ) :: {:ok, map()} | {:error, term()}
BackgroundService.startObserving
Enables event updates for the service.
Link to this function
stop_observing(session, parameters, options \\ [])
View Source
stop_observing(session, parameters, options \\ [])
View Source
stop_observing(
GenServer.server(),
%{service: cdp_service_name_type()},
Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}
stop_observing( GenServer.server(), %{service: cdp_service_name_type()}, Tungsten.Connection.exec_options() ) :: {:ok, map()} | {:error, term()}
BackgroundService.stopObserving
Disables event updates for the service.