Package-level declarations

Types

Link copied to clipboard
@Serializable
object DisableResponse

A dummy response object for the PreloadDomain.disable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
object EnableResponse

A dummy response object for the PreloadDomain.enable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
enum PrefetchStatus : Enum<PrefetchStatus>

TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and filter out the ones that aren't necessary to the developers.

Link copied to clipboard
Link copied to clipboard
@Serializable
data class PreloadingAttemptKey(val loaderId: LoaderId, val action: SpeculationAction, val url: String, val targetHint: SpeculationTargetHint? = null)

A key that identifies a preloading attempt.

Link copied to clipboard
@Serializable
data class PreloadingAttemptSource(val key: PreloadingAttemptKey, val ruleSetIds: List<RuleSetId>, val nodeIds: List<BackendNodeId>)

Lists sources for a preloading attempt, specifically the ids of rule sets that had a speculation rule that triggered the attempt, and the BackendNodeIds of or elements that triggered the attempt (in the case of attempts triggered by a document rule). It is possible for mulitple rule sets and links to trigger a single attempt.

Link copied to clipboard
@Serializable
enum PreloadingStatus : Enum<PreloadingStatus>

Preloading status values, see also PreloadingTriggeringOutcome. This status is shared by prefetchStatusUpdated and prerenderStatusUpdated.

Link copied to clipboard

List of FinalStatus reasons for Prerender2.

Link copied to clipboard
@Serializable
data class RuleSet(val id: RuleSetId, val loaderId: LoaderId, val sourceText: String, val backendNodeId: BackendNodeId? = null, val url: String? = null, val requestId: RequestId? = null, val errorType: RuleSetErrorType? = null, val errorMessage: String? = null)

Corresponds to SpeculationRuleSet

Link copied to clipboard
Link copied to clipboard
typealias RuleSetId = String

Unique id

Official doc

Link copied to clipboard

The type of preloading attempted. It corresponds to mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it isn't being used by clients).

Link copied to clipboard

Corresponds to mojom::SpeculationTargetHint. See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints