Preload🧪
✅️️ Methods
🔨Preload.disable
🔨Preload.enable
✅️️ Events
👋Preload.prefetchStatusUpdated
当预取尝试更新时触发。
EN
Fired when a prefetch attempt is updated.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| key | ✔️ | PreloadingAttemptKey | |||
| pipelineId | ✔️ | PreloadPipelineId | |||
| initiatingFrameId | ✔️ | Page.FrameId | 发起预取的框架的框架ID。 | ENThe frame id of the frame initiating prefetch. | |
| prefetchUrl | ✔️ | string | |||
| status | ✔️ | PreloadingStatus | |||
| prefetchStatus | ✔️ | PrefetchStatus | |||
| requestId | ✔️ | Network.RequestId |
👋Preload.preloadEnabledStateUpdated
当预加载启用状态更新时触发。
EN
Fired when a preload enabled state is updated.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| disabledByPreference | ✔️ | boolean | |||
| disabledByDataSaver | ✔️ | boolean | |||
| disabledByBatterySaver | ✔️ | boolean | |||
| disabledByHoldbackPrefetchSpeculationRules | ✔️ | boolean | |||
| disabledByHoldbackPrerenderSpeculationRules | ✔️ | boolean |
👋Preload.preloadingAttemptSourcesUpdated
发送文档中所有预加载尝试的源列表。
EN
Send a list of sources for all preloading attempts in a document.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| loaderId | ✔️ | Network.LoaderId | |||
| preloadingAttemptSources | ✔️ | array[PreloadingAttemptSource] |
👋Preload.prerenderStatusUpdated
当预渲染尝试被更新时触发。
EN
Fired when a prerender attempt is updated.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| key | ✔️ | PreloadingAttemptKey | |||
| pipelineId | ✔️ | PreloadPipelineId | |||
| status | ✔️ | PreloadingStatus | |||
| prerenderStatus | PrerenderFinalStatus | ||||
| disallowedMojoInterface | string | 这用于向用户提供更多关于与预渲染不兼容并导致尝试取消的Mojo接口名称的信息。 | ENThis is used to give users more information about the name of Mojo interface that is incompatible with prerender and has caused the cancellation of the attempt. | ||
| mismatchedHeaders | array[PrerenderMismatchedHeaders] |
👋Preload.ruleSetRemoved
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| id | ✔️ | RuleSetId |
👋Preload.ruleSetUpdated
Upsert。目前,仅当规则集添加时才会触发。
EN
Upsert. Currently, it is only emitted when a rule set added.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| ruleSet | ✔️ | RuleSet |