跳到主要内容

Page

与所检查页面相关的操作和事件属于页面域。

EN
Actions and events related to the inspected page belong to the page domain.

✅️️ Methods

🔨Page.addScriptToEvaluateOnNewDocument

在创建每个帧时(在加载帧的脚本之前)评估给定的脚本。

EN
Evaluates given script in every frame upon creation (before loading frame's scripts).
参数必填标记类型描述原文
source✔️string
worldName🧪string如果指定,将创建一个具有给定名称的独立世界,并在其中执行给定的脚本。当相应事件被触发时,此世界名称将用作ExecutionContextDescription::name。
ENIf specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
includeCommandLineAPI🧪boolean指定命令行API是否应对脚本可用,默认为false。
ENSpecifies whether command line API should be available to the script, defaults to false.
runImmediately🧪boolean如果为真,则立即在现有的执行上下文或世界中运行脚本。默认值:false。
ENIf true, runs the script immediately on existing execution contexts or worlds. Default: false.
返回对象类型描述原文
identifierScriptIdentifier已添加脚本的标识符。
ENIdentifier of the added script.

🔨Page.bringToFront

将页面置于前台(激活标签页)。

EN
Brings page to front (activates tab).

🔨Page.captureScreenshot

捕获页面截图。

EN
Capture page screenshot.
参数必填标记类型描述原文
formatstring图像压缩格式(默认为 png)。
允许的值:jpegpngwebp
ENImage compression format (defaults to png).
Allowed Values: jpeg, png, webp
qualityinteger压缩质量范围从[0..100](仅限jpeg格式)。
ENCompression quality from range [0..100] (jpeg only).
clipViewport仅捕获给定区域的屏幕截图。
ENCapture the screenshot of a given region only.
fromSurface🧪boolean从表面而非视图捕获屏幕截图。默认为 true。
ENCapture the screenshot from the surface, rather than the view. Defaults to true.
captureBeyondViewport🧪boolean捕获超出视口的屏幕截图。默认为 false。
ENCapture the screenshot beyond the viewport. Defaults to false.
optimizeForSpeed🧪boolean优化图像编码以提升速度,而非压缩文件大小(默认值为 false)
ENOptimize image encoding for speed, not for resulting size (defaults to false)
返回对象类型描述原文
datastringBase64编码的图像数据。(在通过JSON传递时编码为base64字符串)
ENBase64-encoded image data. (Encoded as a base64 string when passed over JSON)

🔨Page.close

尝试关闭页面,运行其beforeunload钩子(如果有的话)。

EN
Tries to close page, running its beforeunload hooks, if any.

🔨Page.createIsolatedWorld

为给定的框架创建一个隔离的世界。

EN
Creates an isolated world for the given frame.
参数必填标记类型描述原文
frameId✔️FrameId在其中创建隔离世界的框架的Id。
ENId of the frame in which the isolated world should be created.
worldNamestring一个可选名称,在''执行上下文''中报告。
ENAn optional name which is reported in the Execution Context.
grantUniveralAccessboolean是否应向隔离世界授予通用访问权限。这是一个强大的选项,请谨慎使用。
ENWhether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.
返回对象类型描述原文
executionContextIdRuntime.ExecutionContextId隔离世界的执行上下文。
ENExecution context of the isolated world.

🔨Page.disable

禁用页面域通知。

EN
Disables page domain notifications.

🔨Page.enable

启用页面域通知。

EN
Enables page domain notifications.
参数必填标记类型描述原文
enableFileChooserOpenedEvent🧪boolean如果为真,无论Page.setInterceptFileChooserDialog命令设置的状态如何,都会触发Page.fileChooserOpened事件(默认值:false)。
ENIf true, the Page.fileChooserOpened event will be emitted regardless of the state set by Page.setInterceptFileChooserDialog command (default: false).

🔨Page.getAppManifest

获取当前文档已处理的清单。此API始终等待清单加载完成。如果提供了manifestId,并且它与当前文档的清单不匹配,此API将报错。如果没有已加载的页面,此API将立即报错。

EN
Gets the processed manifest for this current document. This API always waits for the manifest to be loaded. If manifestId is provided, and it does not match the manifest of the current document, this API errors out. If there is not a loaded page, this API errors out immediately.
参数必填标记类型描述原文
manifestIdstring
返回对象类型描述原文
urlstring清单位置。
ENManifest location.
errorsarray[AppManifestError]
datastring清单内容。
ENManifest content.
parsedAppManifestParsedProperties已解析清单属性。已弃用,请改用清单。
ENParsed manifest properties. Deprecated, use manifest instead.
manifestWebAppManifest

🔨Page.getFrameTree

返回当前帧树结构。

EN
Returns present frame tree structure.
返回对象类型描述原文
frameTreeFrameTree呈现框架树结构。
ENPresent frame tree structure.

🔨Page.getLayoutMetrics

返回与页面布局相关的指标,例如视口边界/缩放。

EN
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
返回对象类型描述原文
layoutViewportLayoutViewport已弃用的与布局视口相关的度量指标。以设备像素为单位。请改用 cssLayoutViewport
ENDeprecated metrics relating to the layout viewport. Is in device pixels. Use cssLayoutViewport instead.
visualViewportVisualViewport已弃用的与视觉视口相关的度量指标。以设备像素为单位。请改用 cssVisualViewport
ENDeprecated metrics relating to the visual viewport. Is in device pixels. Use cssVisualViewport instead.
contentSizeDOM.Rect已弃用的滚动区域尺寸。以设备独立像素(DP)为单位。请改用 cssContentSize
ENDeprecated size of scrollable area. Is in DP. Use cssContentSize instead.
cssLayoutViewportLayoutViewport与CSS像素中布局视口相关的度量指标。
ENMetrics relating to the layout viewport in CSS pixels.
cssVisualViewportVisualViewport与CSS像素中视觉视口相关的度量指标。
ENMetrics relating to the visual viewport in CSS pixels.
cssContentSizeDOM.Rect可滚动区域的尺寸,以CSS像素为单位。
ENSize of scrollable area in CSS pixels.

🔨Page.getNavigationHistory

返回当前页面的导航历史记录。

EN
Returns navigation history for the current page.
返回对象类型描述原文
currentIndexinteger当前导航历史条目的索引。
ENIndex of the current navigation history entry.
entriesarray[NavigationEntry]导航历史记录条目数组。
ENArray of navigation history entries.

🔨Page.handleJavaScriptDialog

接受或关闭由JavaScript触发的对话框(alert、confirm、prompt或onbeforeunload)。

EN
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
参数必填标记类型描述原文
accept✔️boolean是否接受或关闭对话框。
ENWhether to accept or dismiss the dialog.
promptTextstring在确认前需要输入到对话框提示中的文本。仅当这是一个提示对话框时使用。
ENThe text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.

将当前页面导航到给定的URL。

EN
Navigates current page to the given URL.
参数必填标记类型描述原文
url✔️string导航页面至的URL。
ENURL to navigate the page to.
referrerstringReferrer URL.
ENReferrer URL.
transitionTypeTransitionType预期过渡类型。
ENIntended transition type.
frameIdFrameId要导航的框架ID,如果未指定,则导航至顶层框架。
ENFrame id to navigate, if not specified navigates the top frame.
referrerPolicy🧪ReferrerPolicy用于导航的引用者策略。
ENReferrer-policy used for the navigation.
返回对象类型描述原文
frameIdFrameId已导航(或导航失败)的帧ID
ENFrame id that has navigated (or failed to navigate)
loaderIdNetwork.LoaderId加载器标识符。在同文档导航的情况下,此字段会被省略,因为先前提交的加载器ID不会发生变化。
ENLoader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change.
errorTextstring用户友好的错误信息,仅在导航失败时显示。
ENUser friendly error message, present if and only if navigation has failed.
isDownloadboolean导航是否导致了下载。
ENWhether the navigation resulted in a download.

导航当前页面至指定的历史记录条目。

EN
Navigates current page to the given history entry.
参数必填标记类型描述原文
entryId✔️integer导航至条目的唯一标识符。
ENUnique id of the entry to navigate to.

🔨Page.printToPDF

将页面打印为PDF。

EN
Print page as PDF.
参数必填标记类型描述原文
landscapeboolean纸张方向。默认为 false。
ENPaper orientation. Defaults to false.
displayHeaderFooterboolean显示页眉和页脚。默认为 false。
ENDisplay header and footer. Defaults to false.
printBackgroundboolean打印背景图形。默认为 false。
ENPrint background graphics. Defaults to false.
scalenumber网页渲染的缩放比例。默认为 1。
ENScale of the webpage rendering. Defaults to 1.
paperWidthnumber纸张宽度,单位为英寸。默认为8.5英寸。
ENPaper width in inches. Defaults to 8.5 inches.
paperHeightnumber纸张高度,以英寸为单位。默认为 11 英寸。
ENPaper height in inches. Defaults to 11 inches.
marginTopnumber上边距,以英寸为单位。默认为1厘米(约0.4英寸)。
ENTop margin in inches. Defaults to 1cm (~0.4 inches).
marginBottomnumber底部边距,单位为英寸。默认为1厘米(约0.4英寸)。
ENBottom margin in inches. Defaults to 1cm (~0.4 inches).
marginLeftnumber左边距(以英寸为单位)。默认为1厘米(约0.4英寸)。
ENLeft margin in inches. Defaults to 1cm (~0.4 inches).
marginRightnumber右边距,单位为英寸。默认为1厘米(约0.4英寸)。
ENRight margin in inches. Defaults to 1cm (~0.4 inches).
pageRangesstring要打印的纸张范围,基于一页起始,例如'1-5, 8, 11-13'。页面按文档顺序而非指定顺序打印,且每页最多打印一次。默认为空字符串,表示打印整个文档。页码会静默限制在文档实际页数内,超出文档末尾的范围将被忽略。若因此导致无页面可打印,将报告错误。指定起始页码大于结束页码的范围将导致错误。
ENPaper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.
headerTemplatestring打印页眉的HTML模板。应为有效的HTML标记,使用以下类将打印值注入其中:
- date:格式化后的打印日期
- title:文档标题
- url:文档位置
- pageNumber:当前页码
- totalPages:文档总页数

例如,<span class=title></span>将生成包含标题的span元素。
ENHTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:
- date: formatted print date
- title: document title
- url: document location
- pageNumber: current page number
- totalPages: total pages in the document

For example, <span class=title></span> would generate span containing the title.
footerTemplatestring打印页脚的HTML模板。应使用与headerTemplate相同的格式。
ENHTML template for the print footer. Should use the same format as the headerTemplate.
preferCSSPageSizeboolean是否优先使用CSS定义的页面尺寸。默认为false,这种情况下内容将缩放以适应纸张大小。
ENWhether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
transferMode🧪string以流的形式返回
允许的值:ReturnAsBase64ReturnAsStream
ENreturn as stream
Allowed Values: ReturnAsBase64, ReturnAsStream
generateTaggedPDF🧪boolean是否生成带标签(可访问)的PDF。默认为嵌入器选择。
ENWhether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
generateDocumentOutline🧪boolean是否将文档大纲嵌入到PDF中。
ENWhether or not to embed the document outline into the PDF.
返回对象类型描述原文
datastringBase64编码的pdf数据。如果指定了|returnAsStream|,则为空。(通过JSON传递时编码为base64字符串)
ENBase64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON)
streamIO.StreamHandle一个流句柄,用于保存生成的PDF数据。
ENA handle of the stream that holds resulting PDF data.

🔨Page.reload

重新加载指定页面,可选择忽略缓存。

EN
Reloads given page optionally ignoring the cache.
参数必填标记类型描述原文
ignoreCacheboolean如果为真,浏览器缓存将被忽略(如同用户按下了 Shift+刷新)。
ENIf true, browser cache is ignored (as if the user pressed Shift+refresh).
scriptToEvaluateOnLoadstring如果设置,脚本将在重新加载后注入到被检查页面的所有框架中。如果重新加载的数据URL来源,参数将被忽略。
ENIf set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.
loaderId🧪Network.LoaderId如果设置此选项,当目标页面主框架的加载器ID与提供的ID不匹配时,将抛出错误。这可以防止在发生竞态导航时意外重新加载非预期目标。
ENIf set, an error will be thrown if the target page's main frame's loader id does not match the provided id. This prevents accidentally reloading an unintended target in case there's a racing navigation.

🔨Page.removeScriptToEvaluateOnNewDocument

从列表中移除给定的脚本。

EN
Removes given script from the list.
参数必填标记类型描述原文
identifier✔️ScriptIdentifier

🔨Page.resetNavigationHistory

重置当前页面的导航历史记录。

EN
Resets navigation history for the current page.

🔨Page.setBypassCSP

启用页面内容安全策略绕过。

EN
Enable page Content Security Policy by-passing.
参数必填标记类型描述原文
enabled✔️boolean是否绕过页面CSP。
ENWhether to bypass page CSP.

🔨Page.setDocumentContent

将给定的标记设置为文档的HTML。

EN
Sets given markup as the document's HTML.
参数必填标记类型描述原文
frameId✔️FrameId要设置 HTML 的框架 ID。
ENFrame id to set HTML for.
html✔️string要设置的HTML内容。
ENHTML content to set.

🔨Page.setInterceptFileChooserDialog

拦截文件选择器请求并将控制权转移给协议客户端。启用文件选择器拦截后,不会显示原生文件选择对话框,而是会触发协议事件 Page.fileChooserOpened

EN
Intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event Page.fileChooserOpened is emitted.
参数必填标记类型描述原文
enabled✔️boolean
cancel🧪boolean如果为真,除了在启用拦截时不显示对话框外,还会通过发出相关事件(如果有)来取消对话框(默认值:false)。
ENIf true, cancels the dialog by emitting relevant events (if any) in addition to not showing it if the interception is enabled (default: false).

🔨Page.setLifecycleEventsEnabled

控制页面是否发出生命周期事件。

EN
Controls whether page will emit lifecycle events.
参数必填标记类型描述原文
enabled✔️boolean如果为真,则开始触发生命周期事件。
ENIf true, starts emitting lifecycle events.

🔨Page.stopLoading

强制页面停止所有导航和待处理的资源获取。

EN
Force the page stop all navigations and pending resource fetches.

🔨Page.clearGeolocationOverride❌️

清除被覆盖的地理位置定位和错误信息。

EN
Clears the overridden Geolocation Position and Error.

🔨Page.setGeolocationOverride❌️

覆盖地理位置位置或错误。省略任何参数将模拟位置不可用。

EN
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
参数必填标记类型描述原文
latitudenumber模拟纬度
ENMock latitude
longitudenumber模拟经度
ENMock longitude
accuracynumber模拟准确度
ENMock accuracy

🔨Page.addCompilationCache🧪

为给定URL预填充编译缓存。编译缓存不会在跨进程导航中保留。

EN
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
参数必填标记类型描述原文
url✔️string
data✔️stringBase64编码数据(在JSON中传递时编码为base64字符串)
ENBase64-encoded data (Encoded as a base64 string when passed over JSON)

🔨Page.captureSnapshot🧪

返回页面的快照字符串。对于MHTML格式,序列化包含iframe、shadow DOM、外部资源以及元素内联样式。

EN
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
参数必填标记类型描述原文
formatstring格式(默认为mhtml)。
允许的值:mhtml
ENFormat (defaults to mhtml).
Allowed Values: mhtml
返回对象类型描述原文
datastring序列化页面数据。
ENSerialized page data.

🔨Page.clearCompilationCache🧪

清除已播种的编译缓存。

EN
Clears seeded compilation cache.

🔨Page.crash🧪

在IO线程上崩溃渲染器,生成minidumps。

EN
Crashes renderer on the IO thread, generates minidumps.

🔨Page.generateTestReport🧪

为测试生成报告。

EN
Generates a report for testing.
参数必填标记类型描述原文
message✔️string要在报告中显示的消息。
ENMessage to be displayed in the report.
groupstring指定将报告发送到的端点组。
ENSpecifies the endpoint group to deliver the report to.

🔨Page.getAdScriptAncestry🧪

参数必填标记类型描述原文
frameId✔️FrameId
返回对象类型描述原文
adScriptAncestryAdScriptAncestry导致此框架创建的广告脚本标识符的祖先链,以及根脚本的过滤列表规则。祖先链按照从最直接的脚本(在框架创建堆栈中)到更远的祖先(创建了紧邻的前一个脚本)的顺序排列。仅在框架被标记为广告且标识符可用时发送。
ENThe ancestry chain of ad script identifiers leading to this frame's creation, along with the root script's filterlist rule. The ancestry chain is ordered from the most immediate script (in the frame creation stack) to more distant ancestors (that created the immediately preceding script). Only sent if frame is labelled as an ad and ids are available.

🔨Page.getAnnotatedPageContent🧪

获取主框架的带注释页面内容。这是一个实验性命令,可能会发生变化。

EN
Get the annotated page content for the main frame. This is an experimental command that is subject to change.
参数必填标记类型描述原文
includeActionableInformationboolean是否包含可操作信息。默认为 true。
ENWhether to include actionable information. Defaults to true.
返回对象类型描述原文
contentstring带注释的页面内容以base64编码的protobuf格式呈现。该格式由components/optimization_guide/proto/features/common_quality_data.proto文件中的AnnotatedPageContent消息定义(通过JSON传递时以base64字符串形式编码)
ENThe annotated page content as a base64 encoded protobuf. The format is defined by the AnnotatedPageContent message in components/optimization_guide/proto/features/common_quality_data.proto (Encoded as a base64 string when passed over JSON)

🔨Page.getAppId🧪

返回唯一的(PWA)应用标识符。仅当功能标志'WebAppEnableManifestId'启用时返回值

EN
Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
返回对象类型描述原文
appIdstring应用ID,来自清单的id属性或根据start_url计算得出
ENApp id, either from manifest's id attribute or computed from start_url
recommendedIdstring建议manifest的id属性与从start_url计算出的当前id相匹配
ENRecommendation for manifest's id attribute to match current id computed from start_url

🔨Page.getInstallabilityErrors🧪

返回对象类型描述原文
installabilityErrorsarray[InstallabilityError]

🔨Page.getOriginTrials🧪

在指定框架上获取原始试验。

EN
Get Origin Trials on given frame.
参数必填标记类型描述原文
frameId✔️FrameId
返回对象类型描述原文
originTrialsarray[OriginTrial]

🔨Page.getPermissionsPolicyState🧪

获取给定框架的权限策略状态。

EN
Get Permissions Policy state on given frame.
参数必填标记类型描述原文
frameId✔️FrameId
返回对象类型描述原文
statesarray[PermissionsPolicyFeatureState]

🔨Page.getResourceContent🧪

返回给定资源的''内容''。

EN
Returns content of the given resource.
参数必填标记类型描述原文
frameId✔️FrameId要获取资源的框架ID。
ENFrame id to get resource for.
url✔️string获取内容的资源URL。
ENURL of the resource to get content for.
返回对象类型描述原文
contentstring资源内容。
ENResource content.
base64Encodedboolean是的,如果内容是以 base64 格式提供的。
ENTrue, if content was served as base64.

🔨Page.getResourceTree🧪

返回当前的框架/资源树结构。

EN
Returns present frame / resource tree structure.
返回对象类型描述原文
frameTreeFrameResourceTree呈现框架/资源树结构。
ENPresent frame / resource tree structure.

🔨Page.produceCompilationCache🧪

请求后端为指定脚本生成编译缓存。scripts 将被追加到待生成缓存的脚本列表中。该列表可能在页面导航期间被重置。当遇到URL匹配的脚本时,后端会根据内部启发式算法自主决定是否生成缓存。另请参阅:Page.compilationCacheProduced

EN
Requests backend to produce compilation cache for the specified scripts. scripts are appended to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: Page.compilationCacheProduced.
参数必填标记类型描述原文
scripts✔️array[CompilationCacheParams]

🔨Page.screencastFrameAck🧪

确认前端已接收到屏幕广播帧。

EN
Acknowledges that a screencast frame has been received by the frontend.
参数必填标记类型描述原文
sessionId✔️integer帧编号。
ENFrame number.

🔨Page.searchInResource🧪

在资源内容中搜索给定的字符串。

EN
Searches for given string in resource content.
参数必填标记类型描述原文
frameId✔️FrameId要在其中搜索资源的帧ID。
ENFrame id for resource to search in.
url✔️string要在其中搜索资源的URL。
ENURL of the resource to search in.
query✔️string搜索的字符串。
ENString to search for.
caseSensitiveboolean如果为真,则区分大小写。
ENIf true, search is case sensitive.
isRegexboolean如果为真,则将字符串参数视为正则表达式。
ENIf true, treats string parameter as regex.
返回对象类型描述原文
resultarray[Debugger.SearchMatch]搜索结果列表。
ENList of search matches.

🔨Page.setAdBlockingEnabled🧪

在所有网站上启用Chrome的实验性广告过滤器。

EN
Enable Chrome's experimental ad filter on all sites.
参数必填标记类型描述原文
enabled✔️boolean是否屏蔽广告。
ENWhether to block ads.

🔨Page.setFontFamilies🧪

设置通用字体族。

EN
Set generic font families.
参数必填标记类型描述原文
fontFamilies✔️FontFamilies指定要设置的字体家族。如果未指定字体家族,则不会更改。
ENSpecifies font families to set. If a font family is not specified, it won't be changed.
forScriptsarray[ScriptFontFamilies]指定为各脚本设置的字体族。
ENSpecifies font families to set for individual scripts.

🔨Page.setFontSizes🧪

设置默认字体大小。

EN
Set default font sizes.
参数必填标记类型描述原文
fontSizes✔️FontSizes指定要设置的字体大小。如果未指定字体大小,则不会更改。
ENSpecifies font sizes to set. If a font size is not specified, it won't be changed.

🔨Page.setPrerenderingAllowed🧪

手动启用/禁用预渲染。
此命令是应对 https://crbug.com/1440085 的短期解决方案。详见 https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
待办事项(https://crbug.com/1440085):待 Puppeteer 支持标签页目标后移除此项。

EN
Enable/disable prerendering manually.
This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details.
TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
参数必填标记类型描述原文
isAllowed✔️boolean

🔨Page.setRPHRegistrationMode🧪

Custom Handlers API 的扩展:https://html.spec.whatwg.org/multipage/system-state.html#rph-automation

EN
参数必填标记类型描述原文
mode✔️string允许的值:noneautoAcceptautoReject
ENAllowed Values: none, autoAccept, autoReject

🔨Page.setSPCTransactionMode🧪

设置安全支付确认交易模式。https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode

EN
参数必填标记类型描述原文
mode✔️string允许的值:noneautoAcceptautoChooseToAuthAnotherWayautoRejectautoOptOut
ENAllowed Values: none, autoAccept, autoChooseToAuthAnotherWay, autoReject, autoOptOut

🔨Page.setWebLifecycleState🧪

尝试更新页面的Web生命周期状态。它将根据以下规范将页面过渡到给定状态:https://github.com/WICG/web-lifecycle/

EN
Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/
参数必填标记类型描述原文
state✔️string目标生命周期状态
允许的取值:frozenactive
ENTarget lifecycle state
Allowed Values: frozen, active

🔨Page.startScreencast🧪

开始使用 screencastFrame 事件发送每一帧。

EN
Starts sending each frame using the screencastFrame event.
参数必填标记类型描述原文
formatstring图像压缩格式。
允许的取值:jpegpng
ENImage compression format.
Allowed Values: jpeg, png
qualityinteger压缩质量范围从[0..100]。
ENCompression quality from range [0..100].
maxWidthinteger最大截图宽度。
ENMaximum screenshot width.
maxHeightinteger最大截图高度。
ENMaximum screenshot height.
everyNthFrameinteger发送每第n帧。
ENSend every n-th frame.

🔨Page.stopScreencast🧪

停止发送 screencastFrame 中的每一帧。

EN
Stops sending each frame in the screencastFrame.

🔨Page.waitForDebugger🧪

暂停页面执行。可通过通用的Runtime.runIfWaitingForDebugger恢复执行。

EN
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.

🔨Page.addScriptToEvaluateOnLoad🧪❌️

已弃用,请改用 addScriptToEvaluateOnNewDocument。

EN
Deprecated, please use addScriptToEvaluateOnNewDocument instead.
参数必填标记类型描述原文
scriptSource✔️string
返回对象类型描述原文
identifierScriptIdentifier添加的脚本的标识符。
ENIdentifier of the added script.

🔨Page.clearDeviceMetricsOverride🧪❌️

清除被覆盖的设备指标。

EN
Clears the overridden device metrics.

🔨Page.clearDeviceOrientationOverride🧪❌️

清除被覆盖的设备方向。

EN
Clears the overridden Device Orientation.

🔨Page.deleteCookie🧪❌️

删除具有指定名称、域名和路径的浏览器Cookie。

EN
Deletes browser cookie with given name, domain and path.
参数必填标记类型描述原文
cookieName✔️string要删除的Cookie的名称。
ENName of the cookie to remove.
url✔️string匹配cookie域名和路径的URL。
ENURL to match cooke domain and path.

🔨Page.getManifestIcons🧪❌️

已弃用,因为不能保证返回的图标确实是用于PWA安装的那个。

EN
Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
返回对象类型描述原文
primaryIconstring

🔨Page.removeScriptToEvaluateOnLoad🧪❌️

已弃用,请改用 removeScriptToEvaluateOnNewDocument

EN
Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
参数必填标记类型描述原文
identifier✔️ScriptIdentifier

🔨Page.setDeviceMetricsOverride🧪❌️

覆盖设备屏幕尺寸的值(window.screen.width、window.screen.height、window.innerWidth、window.innerHeight,以及与"device-width"/"device-height"相关的CSS媒体查询结果)。

EN
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
参数必填标记类型描述原文
width✔️integer覆盖宽度值(以像素为单位,最小值为0,最大值为10000000)。0表示禁用覆盖。
ENOverriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
height✔️integer覆盖高度值(以像素为单位,最小值为0,最大值为10000000)。0表示禁用覆盖。
ENOverriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
deviceScaleFactor✔️number覆盖设备缩放比例值。0表示禁用覆盖。
ENOverriding device scale factor value. 0 disables the override.
mobile✔️boolean是否模拟移动设备。这包括 viewport meta 标签、滚动条覆盖、文本自动调整大小等。
ENWhether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
scalenumber应用于结果视图图像的缩放比例。
ENScale to apply to resulting view image.
screenWidthinteger覆盖屏幕宽度值(单位为像素,最小值为0,最大值为10000000)。
ENOverriding screen width value in pixels (minimum 0, maximum 10000000).
screenHeightinteger覆盖屏幕高度值,单位为像素(最小值为0,最大值为10000000)。
ENOverriding screen height value in pixels (minimum 0, maximum 10000000).
positionXinteger覆盖屏幕上视图的X位置(以像素为单位)(最小值为0,最大值为10000000)。
ENOverriding view X position on screen in pixels (minimum 0, maximum 10000000).
positionYinteger覆盖屏幕上视图的Y轴位置(以像素为单位,最小值为0,最大值为10000000)。
ENOverriding view Y position on screen in pixels (minimum 0, maximum 10000000).
dontSetVisibleSizeboolean不要设置可见视图尺寸,依赖显式的 setVisibleSize 调用。
ENDo not set visible view size, rely upon explicit setVisibleSize call.
screenOrientationEmulation.ScreenOrientation屏幕方向覆盖。
ENScreen orientation override.
viewportViewport视口尺寸和缩放比例。如果未设置,则清除覆盖。
ENThe viewport dimensions and scale. If not set, the override is cleared.

🔨Page.setDeviceOrientationOverride🧪❌️

覆盖设备方向。

EN
Overrides the Device Orientation.
参数必填标记类型描述原文
alpha✔️number模拟 alpha
ENMock alpha
beta✔️number模拟测试版
ENMock beta
gamma✔️number模拟伽马值
ENMock gamma

🔨Page.setDownloadBehavior🧪❌️

设置下载文件时的行为。

EN
Set the behavior when downloading a file.
参数必填标记类型描述原文
behavior✔️string是否允许所有或拒绝所有下载请求,或者使用默认的Chrome行为(如果可用,否则拒绝)。
允许值:denyallowdefault
ENWhether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
Allowed Values: deny, allow, default
downloadPathstring下载文件的默认保存路径。如果行为设置为'allow',则此项为必需。
ENThe default path to save downloaded files to. This is required if behavior is set to 'allow'

🔨Page.setTouchEmulationEnabled🧪❌️

切换基于鼠标事件的触摸事件模拟。

EN
Toggles mouse event-based touch event emulation.
参数必填标记类型描述原文
enabled✔️boolean是否应启用触摸事件模拟。
ENWhether the touch event emulation should be enabled.
configurationstring触摸/手势事件配置。默认值:当前平台。
允许的取值:mobiledesktop
ENTouch/gesture events configuration. Default: current platform.
Allowed Values: mobile, desktop

✅️️ Events

👋Page.domContentEventFired

参数必填标记类型描述原文
timestamp✔️Network.MonotonicTime

👋Page.fileChooserOpened

仅当启用 page.interceptFileChooser 时才会发出。

EN
Emitted only when page.interceptFileChooser is enabled.
参数必填标记类型描述原文
frameId✔️🧪FrameId包含输入节点的框架ID。
ENId of the frame containing input node.
mode✔️string输入模式。
允许的值:selectSingleselectMultiple
ENInput mode.
Allowed Values: selectSingle, selectMultiple
backendNodeId🧪DOM.BackendNodeId输入节点ID。仅当文件选择器通过<input type="file">元素打开时存在。
ENInput node id. Only present for file choosers opened via an <input type="file"> element.

👋Page.frameAttached

当框架被附加到其父框架时触发。

EN
Fired when frame has been attached to its parent.
参数必填标记类型描述原文
frameId✔️FrameId已附加框架的ID。
ENId of the frame that has been attached.
parentFrameId✔️FrameId父框架标识符。
ENParent frame identifier.
stackRuntime.StackTraceJavaScript 堆栈跟踪,显示框架何时被附加,仅当框架由脚本发起时设置。
ENJavaScript stack trace of when frame was attached, only set if frame initiated from script.

👋Page.frameDetached

当框架从其父级分离时触发。

EN
Fired when frame has been detached from its parent.
参数必填标记类型描述原文
frameId✔️FrameId已分离框架的Id。
ENId of the frame that has been detached.
reason✔️🧪string允许的值:removeswap
ENAllowed Values: remove, swap

👋Page.frameNavigated

''和``里面的内容保持不变,导航完成后触发一次。此时框架已与新的加载器关联。

EN
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
参数必填标记类型描述原文
frame✔️FrameFrame对象。
ENFrame object.
type✔️🧪NavigationType

👋Page.interstitialHidden

当插页式页面被隐藏时触发

EN
Fired when interstitial page was hidden

👋Page.interstitialShown

当插页式页面显示时触发

EN
Fired when interstitial page was shown

👋Page.javascriptDialogClosed

当一个由JavaScript触发的对话框(alert、confirm、prompt或onbeforeunload)被关闭时触发。

EN
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
参数必填标记类型描述原文
frameId✔️🧪FrameId帧ID。
ENFrame id.
result✔️boolean对话框是否已确认。
ENWhether dialog was confirmed.
userInput✔️string在提示情况下的用户输入。
ENUser input in case of prompt.

👋Page.javascriptDialogOpening

当JavaScript触发的对话框(alert、confirm、prompt或onbeforeunload)即将打开时触发。

EN
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
参数必填标记类型描述原文
url✔️string帧URL。
ENFrame url.
frameId✔️🧪FrameId帧ID。
ENFrame id.
message✔️string对话框将显示的消息。
ENMessage that will be displayed by the dialog.
type✔️DialogType对话框类型。
ENDialog type.
hasBrowserHandler✔️boolean当且仅当浏览器能够显示或处理指定对话框时为真。若浏览器对指定目标没有对话框处理器,在Page域激活时调用alert将导致页面执行停滞。可通过调用Page.handleJavaScriptDialog恢复执行。
ENTrue iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
defaultPromptstring默认对话框提示。
ENDefault dialog prompt.

👋Page.lifecycleEvent

在当前目标(包括本地框架)中触发生命周期事件(导航、加载、绘制等)时触发。

EN
Fired for lifecycle events (navigation, load, paint, etc) in the current target (including local frames).
参数必填标记类型描述原文
frameId✔️FrameId框架的ID。
ENId of the frame.
loaderId✔️Network.LoaderId加载器标识符。如果请求是从工作线程获取的,则为空字符串。
ENLoader identifier. Empty string if the request is fetched from worker.
name✔️string
timestamp✔️Network.MonotonicTime

👋Page.loadEventFired

参数必填标记类型描述原文
timestamp✔️Network.MonotonicTime

👋Page.windowOpen

当通过window.open()、链接点击、表单提交等方式即将打开新窗口时触发。

EN
Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
参数必填标记类型描述原文
url✔️string新窗口的URL。
ENThe URL for the new window.
windowName✔️string窗口名称。
ENWindow name.
windowFeatures✔️array[string]一个包含已启用窗口功能的数组。
ENAn array of enabled window features.
userGesture✔️boolean无论是否由用户手势触发。
ENWhether or not it was triggered by user gesture.

👋Page.frameClearedScheduledNavigation❌️

当框架不再有计划的导航时触发。

EN
Fired when frame no longer has a scheduled navigation.
参数必填标记类型描述原文
frameId✔️FrameId已清除其预定导航的帧的ID。
ENId of the frame that has cleared its scheduled navigation.

👋Page.frameScheduledNavigation❌️

当框架计划进行潜在导航时触发。

EN
Fired when frame schedules a potential navigation.
参数必填标记类型描述原文
frameId✔️FrameId已安排导航的帧的Id。
ENId of the frame that has scheduled a navigation.
delay✔️number延迟(以秒为单位),直到计划开始导航。导航不保证会开始。
ENDelay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
reason✔️ClientNavigationReason导航的原因。
ENThe reason for the navigation.
url✔️string计划导航的目标URL。
ENThe destination URL for the scheduled navigation.

👋Page.backForwardCacheNotUsed🧪

如果启用了BackForwardCache功能,则针对失败的bfcache历史导航触发。不要假设与Page.frameNavigated事件的任何顺序关系。此事件仅针对主框架历史导航(文档发生变化的非同一文档导航),在bfcache导航失败时触发。

EN
Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.
参数必填标记类型描述原文
loaderId✔️Network.LoaderId关联导航的加载器ID。
ENThe loader id for the associated navigation.
frameId✔️FrameId关联帧的帧ID。
ENThe frame id of the associated frame.
notRestoredExplanations✔️array[BackForwardCacheNotRestoredExplanation]页面无法被缓存的原因数组。此数组不能为空。
ENArray of reasons why the page could not be cached. This must not be empty.
notRestoredExplanationsTreeBackForwardCacheNotRestoredExplanationTree每个帧无法缓存页面的原因树状结构。
ENTree structure of reasons why the page could not be cached for each frame.

👋Page.compilationCacheProduced🧪

为每个生成的编译缓存发出。

EN
Issued for every compilation cache generated.
参数必填标记类型描述原文
url✔️string
data✔️stringBase64编码数据(通过JSON传递时以base64字符串形式编码)
ENBase64-encoded data (Encoded as a base64 string when passed over JSON)

👋Page.documentOpened🧪

在打开文档进行写入时触发。

EN
Fired when opening document to write to.
参数必填标记类型描述原文
frame✔️Frame帧对象。
ENFrame object.

👋Page.frameRequestedNavigation🧪

当请求一个由渲染器发起的导航时触发。导航在事件发出后仍可能被取消。

EN
Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
参数必填标记类型描述原文
frameId✔️FrameId正在导航的帧的Id。
ENId of the frame that is being navigated.
reason✔️ClientNavigationReason导航的原因。
ENThe reason for the navigation.
url✔️string所请求导航的目标URL。
ENThe destination URL for the requested navigation.
disposition✔️ClientNavigationDisposition导航的处置方式。
ENThe disposition for the navigation.

👋Page.frameResized🧪


👋Page.frameStartedLoading🧪

当框架开始加载时触发。

EN
Fired when frame has started loading.
参数必填标记类型描述原文
frameId✔️FrameId开始加载的框架的Id。
ENId of the frame that has started loading.

👋Page.frameStartedNavigating🧪

当导航开始时触发此事件。该事件既会针对渲染器发起的导航,也会针对浏览器发起的导航触发。对于渲染器发起的导航,该事件在 frameRequestedNavigation 之后触发。事件发出后,导航仍可能被取消。单个导航可能触发多个事件,例如,当同文档导航变为跨文档导航时(如框架集的情况)。

EN
Fired when a navigation starts. This event is fired for both renderer-initiated and browser-initiated navigations. For renderer-initiated navigations, the event is fired after frameRequestedNavigation. Navigation may still be cancelled after the event is issued. Multiple events can be fired for a single navigation, for example, when a same-document navigation becomes a cross-document navigation (such as in the case of a frameset).
参数必填标记类型描述原文
frameId✔️FrameId正在导航的框架的ID。
ENID of the frame that is being navigated.
url✔️string导航起始的URL。最终URL可能有所不同。
ENThe URL the navigation started with. The final URL can be different.
loaderId✔️Network.LoaderId加载器标识符。即使在同文档导航的情况下存在,先前提交的loaderId也不会改变,除非导航从同文档变为跨文档导航。
ENLoader identifier. Even though it is present in case of same-document navigation, the previously committed loaderId would not change unless the navigation changes from a same-document to a cross-document navigation.
navigationType✔️string允许的值:reloadreloadBypassingCacherestorerestoreWithPosthistorySameDocumenthistoryDifferentDocumentsameDocumentdifferentDocument
ENAllowed Values: reload, reloadBypassingCache, restore, restoreWithPost, historySameDocument, historyDifferentDocument, sameDocument, differentDocument

👋Page.frameStoppedLoading🧪

当框架停止加载时触发。

EN
Fired when frame has stopped loading.
参数必填标记类型描述原文
frameId✔️FrameId已停止加载的框架的Id。
ENId of the frame that has stopped loading.

👋Page.frameSubtreeWillBeDetached🧪

在帧子树分离之前触发。在子树中的任何帧实际分离之前发出。

EN
Fired before frame subtree is detached. Emitted before any frame of the subtree is actually detached.
参数必填标记类型描述原文
frameId✔️FrameId将分离子树的根框架的ID。
ENId of the frame that is the root of the subtree that will be detached.

当发生同文档导航时触发,例如由于历史记录API的使用或锚点导航。

EN
Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
参数必填标记类型描述原文
frameId✔️FrameId框架的Id。
ENId of the frame.
url✔️string框架的新URL。
ENFrame's new url.
navigationType✔️string导航类型
允许的值:fragmenthistoryApiother
ENNavigation type
Allowed Values: fragment, historyApi, other

👋Page.screencastFrame🧪

startScreencast 请求的压缩图像数据。

EN
Compressed image data requested by the startScreencast.
参数必填标记类型描述原文
data✔️stringBase64编码的压缩图像。(通过JSON传递时编码为base64字符串)
ENBase64-encoded compressed image. (Encoded as a base64 string when passed over JSON)
metadata✔️ScreencastFrameMetadata屏幕投射帧元数据。
ENScreencast frame metadata.
sessionId✔️integer帧编号。
ENFrame number.

👋Page.screencastVisibilityChanged🧪

当启用了屏幕投射的页面显示或隐藏时触发。

EN
Fired when the page with currently enabled screencast was shown or hidden `.
参数必填标记类型描述原文
visible✔️boolean如果页面可见,则为真。
ENTrue if the page is visible.

👋Page.downloadProgress🧪❌️

当下载进度更新时触发。最后一次调用时 |done| == true。已弃用。请改用 Browser.downloadProgress。

EN
Fired when download makes progress. Last call has |done| == true. Deprecated. Use Browser.downloadProgress instead.
参数必填标记类型描述原文
guid✔️string下载的全局唯一标识符。
ENGlobal unique identifier of the download.
totalBytes✔️number需要下载的总预期字节数。
ENTotal expected bytes to download.
receivedBytes✔️number接收的总字节数。
ENTotal bytes received.
state✔️string下载状态。
允许的值:inProgresscompletedcanceled
ENDownload status.
Allowed Values: inProgress, completed, canceled

👋Page.downloadWillBegin🧪❌️

当页面即将开始下载时触发。已弃用。请改用 Browser.downloadWillBegin。

EN
Fired when page is about to start a download. Deprecated. Use Browser.downloadWillBegin instead.
参数必填标记类型描述原文
frameId✔️FrameId导致下载开始的框架ID。
ENId of the frame that caused download to begin.
guid✔️string下载的全局唯一标识符。
ENGlobal unique identifier of the download.
url✔️string正在下载的资源的URL。
ENURL of the resource being downloaded.
suggestedFilename✔️string建议的资源文件名(实际保存在磁盘上的文件名可能有所不同)。
ENSuggested file name of the resource (the actual name of the file saved on disk may differ).

✅️️ Types

📌Page.AppManifestError

解析应用清单时出错。

EN
Error while paring app manifest.

返回类型:object

属性必填标记类型描述原文
message✔️string错误信息。
ENError message.
critical✔️integer如果关键,这是一个不可恢复的解析错误。
ENIf critical, this is a non-recoverable parse error.
line✔️integer错误行。
ENError line.
column✔️integer错误列。
ENError column.

📌Page.DialogType

JavaScript对话框类型。
允许的值:alertconfirmpromptbeforeunload

EN
Javascript dialog type.
Allowed Values: alert, confirm, prompt, beforeunload

返回类型:string


📌Page.Frame

有关页面中Frame的信息。

EN
Information about the Frame on the page.

返回类型:object

属性必填标记类型描述原文
id✔️FrameId帧的唯一标识符。
ENFrame unique identifier.
parentIdFrameId父框架标识符。
ENParent frame identifier.
loaderId✔️Network.LoaderId与此帧关联的加载器的标识符。
ENIdentifier of the loader associated with this frame.
namestring框架的名称,如标签中指定的那样。
ENFrame's name as specified in the tag.
url✔️string框架文档的URL,不包含片段标识符。
ENFrame document's URL without fragment.
urlFragment🧪string框架文档的URL片段,包括'#'。
ENFrame document's URL fragment including the '#'.
domainAndRegistry✔️🧪string框架文档的注册域名,需考虑公共后缀列表。从框架的URL中提取。示例URL:http://www.google.com/file.html -> "google.com" http://a.b.co.uk/file.html -> "b.co.uk"
ENFrame document's registered domain, taking the public suffixes list into account. Extracted from the Frame's url. Example URLs: http://www.google.com/file.html -> "google.com" http://a.b.co.uk/file.html -> "b.co.uk"
securityOrigin✔️string框架文档的安全源。
ENFrame document's security origin.
securityOriginDetails🧪SecurityOriginDetails关于框架文档安全源的附加详细信息。
ENAdditional details about the frame document's security origin.
mimeType✔️string浏览器确定的框架文档的MIME类型。
ENFrame document's mimeType as determined by the browser.
unreachableUrl🧪string如果框架加载失败,此字段包含未能加载的URL。请注意,与上文的url不同,此URL可能包含片段标识符。
ENIf the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
adFrameStatus🧪AdFrameStatus指示此框架是否被标记为广告以及原因。
ENIndicates whether this frame was tagged as an ad and why.
secureContextType✔️🧪SecureContextType指示主文档是否为安全上下文,并解释其原因。
ENIndicates whether the main document is a secure context and explains why that is the case.
crossOriginIsolatedContextType✔️🧪CrossOriginIsolatedContextType指示这是否为跨源隔离上下文。
ENIndicates whether this is a cross origin isolated context.
gatedAPIFeatures✔️🧪array[GatedAPIFeatures]指示哪些受限制的API / 功能可用。
ENIndicated which gated APIs / features are available.

📌Page.FrameId

唯一的框架标识符。

EN
Unique frame identifier.

返回类型:string


📌Page.FrameTree

有关Frame层次结构的信息。

EN
Information about the Frame hierarchy.

返回类型:object

属性必填标记类型描述原文
frame✔️Frame此树状项目的帧信息。
ENFrame information for this tree item.
childFramesarray[FrameTree]子框架。
ENChild frames.

📌Page.LayoutViewport

布局视口的位置和尺寸。

EN
Layout viewport position and dimensions.

返回类型:object

属性必填标记类型描述原文
pageX✔️integer相对于文档的水平偏移量(CSS像素)。
ENHorizontal offset relative to the document (CSS pixels).
pageY✔️integer相对于文档的垂直偏移(CSS像素)。
ENVertical offset relative to the document (CSS pixels).
clientWidth✔️integer宽度(CSS像素),如果存在滚动条则排除滚动条。
ENWidth (CSS pixels), excludes scrollbar if present.
clientHeight✔️integer高度(CSS像素),如果存在滚动条则排除滚动条。
ENHeight (CSS pixels), excludes scrollbar if present.

导航历史记录条目。

EN
Navigation history entry.

返回类型:object

属性必填标记类型描述原文
id✔️integer导航历史条目的唯一标识符。
ENUnique id of the navigation history entry.
url✔️string导航历史条目的URL。
ENURL of the navigation history entry.
userTypedURL✔️string用户在地址栏中输入的URL。
ENURL that the user typed in the url bar.
title✔️string导航历史条目标题。
ENTitle of the navigation history entry.
transitionType✔️TransitionTypeTransition type.
ENTransition type.

📌Page.ScriptIdentifier

唯一的脚本标识符。

EN
Unique script identifier.

返回类型:string


📌Page.TransitionType

过渡类型。
允许的值:linktypedaddress_barauto_bookmarkauto_subframemanual_subframegeneratedauto_toplevelform_submitreloadkeywordkeyword_generatedother

EN
Transition type.
Allowed Values: link, typed, address_bar, auto_bookmark, auto_subframe, manual_subframe, generated, auto_toplevel, form_submit, reload, keyword, keyword_generated, other

返回类型:string


📌Page.Viewport

用于捕获屏幕截图的视口。

EN
Viewport for capturing screenshot.

返回类型:object

属性必填标记类型描述原文
x✔️numberX 偏移量,以设备独立像素 (dip) 为单位。
ENX offset in device independent pixels (dip).
y✔️numberY 偏移量,以设备独立像素 (dip) 为单位。
ENY offset in device independent pixels (dip).
width✔️number矩形宽度,以设备独立像素(dip)为单位。
ENRectangle width in device independent pixels (dip).
height✔️number矩形高度,单位为设备独立像素(dip)。
ENRectangle height in device independent pixels (dip).
scale✔️number页面缩放比例。
ENPage scale factor.

📌Page.VisualViewport

视觉视口的位置、尺寸和缩放比例。

EN
Visual viewport position, dimensions, and scale.

返回类型:object

属性必填标记类型描述原文
offsetX✔️number相对于布局视口的水平偏移量(CSS像素)。
ENHorizontal offset relative to the layout viewport (CSS pixels).
offsetY✔️number相对于布局视口的垂直偏移(CSS像素)。
ENVertical offset relative to the layout viewport (CSS pixels).
pageX✔️number相对于文档的水平偏移(CSS像素)。
ENHorizontal offset relative to the document (CSS pixels).
pageY✔️number相对于文档的垂直偏移(CSS像素)。
ENVertical offset relative to the document (CSS pixels).
clientWidth✔️number宽度(CSS像素),如果存在滚动条则排除滚动条。
ENWidth (CSS pixels), excludes scrollbar if present.
clientHeight✔️number高度(CSS像素),如果存在滚动条则排除滚动条。
ENHeight (CSS pixels), excludes scrollbar if present.
scale✔️number相对于理想视口(宽度为设备宽度时的尺寸)进行缩放。
ENScale relative to the ideal viewport (size at width=device-width).
zoomnumber页面缩放因子(CSS 与设备无关像素比率)。
ENPage zoom factor (CSS to device independent pixels ratio).

📌Page.AdFrameExplanation🧪

允许的值:ParentIsAdCreatedByAdScriptMatchedBlockingRule

EN
Allowed Values: ParentIsAd, CreatedByAdScript, MatchedBlockingRule

返回类型:string


📌Page.AdFrameStatus🧪

指示一个框架是否被识别为广告及其原因。

EN
Indicates whether a frame has been identified as an ad and why.

返回类型:object

属性必填标记类型描述原文
adFrameType✔️AdFrameType
explanationsarray[AdFrameExplanation]

📌Page.AdFrameType🧪

指示一个框架是否被识别为广告。
允许的值:nonechildroot

EN
Indicates whether a frame has been identified as an ad.
Allowed Values: none, child, root

返回类型:string


📌Page.AdScriptAncestry🧪

封装了脚本的祖先链以及导致该框架被标记为广告的根脚本过滤列表规则。仅在 ancestryChain 非空时创建。

EN
Encapsulates the script ancestry and the root script filterlist rule that caused the frame to be labelled as an ad. Only created when ancestryChain is not empty.

返回类型:object

属性必填标记类型描述原文
ancestryChain✔️array[AdScriptId]一条AdScriptId链,表示导致框架创建的广告脚本的祖先关系。该链从脚本本身(较低层级)开始,向上排列至被过滤器列表标记的根祖先。
ENA chain of AdScriptIds representing the ancestry of an ad script that led to the creation of a frame. The chain is ordered from the script itself (lower level) up to its root ancestor that was flagged by filterlist.
rootScriptFilterlistRulestring导致 ancestryChain 中根(最后一个)脚本被标记为广告的过滤列表规则。仅在该规则可用时填充。
ENThe filterlist rule that caused the root (last) script in ancestryChain to be ad-tagged. Only populated if the rule is available.

📌Page.AdScriptId🧪

标识导致脚本或框架被标记为广告的脚本。

EN
Identifies the script which caused a script or frame to be labelled as an ad.

返回类型:object

属性必填标记类型描述原文
scriptId✔️Runtime.ScriptId导致脚本或框架被标记为广告的脚本的脚本ID。
ENScript Id of the script which caused a script or frame to be labelled as an ad.
debuggerId✔️Runtime.UniqueDebuggerId脚本ID的调试器ID。
ENId of scriptId's debugger.

📌Page.AppManifestParsedProperties🧪

已解析应用清单属性。

EN
Parsed app manifest properties.

返回类型:object

属性必填标记类型描述原文
scope✔️string计算得出的作用域值
ENComputed scope value

📌Page.BackForwardCacheBlockingDetails🧪

返回类型:object

属性必填标记类型描述原文
urlstring发生阻塞的文件URL。由于测试原因,此字段为可选。
ENUrl of the file where blockage happened. Optional because of tests.
functionstring发生阻塞的函数名称。由于匿名函数和测试的存在,此项为可选。
ENFunction name where blockage happened. Optional because of anonymous functions and tests.
lineNumber✔️integer脚本中的行号(从0开始计数)。
ENLine number in the script (0-based).
columnNumber✔️integer脚本中的列号(从0开始计数)。
ENColumn number in the script (0-based).

📌Page.BackForwardCacheNotRestoredExplanation🧪

返回类型:object

属性必填标记类型描述原文
type✔️BackForwardCacheNotRestoredReasonType原因类型
ENType of the reason
reason✔️BackForwardCacheNotRestoredReason未恢复原因
ENNot restored reason
contextstring与原因相关的上下文。此上下文的含义取决于具体原因:
- EmbedderExtensionSentMessageToCachedFrame:扩展程序ID。
ENContext associated with the reason. The meaning of this context is dependent on the reason:
- EmbedderExtensionSentMessageToCachedFrame: the extension ID.
detailsarray[BackForwardCacheBlockingDetails]

📌Page.BackForwardCacheNotRestoredExplanationTree🧪

返回类型:object

属性必填标记类型描述原文
url✔️string每个帧的URL
ENURL of each frame
explanations✔️array[BackForwardCacheNotRestoredExplanation]每个框架未恢复的原因
ENNot restored reasons of each frame
children✔️array[BackForwardCacheNotRestoredExplanationTree]子框架数组
ENArray of children frame

📌Page.BackForwardCacheNotRestoredReason🧪

以下是前后向缓存未恢复原因列表。允许值:NotPrimaryMainFrameBackForwardCacheDisabledRelatedActiveContentsExistHTTPStatusNotOKSchemeNotHTTPOrHTTPSLoadingWasGrantedMediaAccessDisableForRenderFrameHostCalledDomainNotAllowedHTTPMethodNotGETSubframeIsNavigatingTimeoutCacheLimitJavaScriptExecutionRendererProcessKilledRendererProcessCrashedSchedulerTrackedFeatureUsedConflictingBrowsingInstanceCacheFlushedServiceWorkerVersionActivationSessionRestoredServiceWorkerPostMessageEnteredBackForwardCacheBeforeServiceWorkerHostAddedRenderFrameHostReused_SameSiteRenderFrameHostReused_CrossSiteServiceWorkerClaimIgnoreEventAndEvictHaveInnerContentsTimeoutPuttingInCacheBackForwardCacheDisabledByLowMemoryBackForwardCacheDisabledByCommandLineNetworkRequestDatapipeDrainedAsBytesConsumerNetworkRequestRedirectedNetworkRequestTimeoutNetworkExceedsBufferLimitNavigationCancelledWhileRestoringNotMostRecentNavigationEntryBackForwardCacheDisabledForPrerenderUserAgentOverrideDiffersForegroundCacheLimitForwardCacheDisabledBrowsingInstanceNotSwappedBackForwardCacheDisabledForDelegateUnloadHandlerExistsInMainFrameUnloadHandlerExistsInSubFrameServiceWorkerUnregistrationCacheControlNoStoreCacheControlNoStoreCookieModifiedCacheControlNoStoreHTTPOnlyCookieModifiedNoResponseHeadUnknownActivationNavigationsDisallowedForBug1234857ErrorDocumentFencedFramesEmbedderCookieDisabledHTTPAuthRequiredCookieFlushedBroadcastChannelOnMessageWebViewSettingsChangedWebViewJavaScriptObjectChangedWebViewMessageListenerInjectedWebViewSafeBrowsingAllowlistChangedWebViewDocumentStartJavascriptChangedWebSocketWebTransportWebRTCMainResourceHasCacheControlNoStoreMainResourceHasCacheControlNoCacheSubresourceHasCacheControlNoStoreSubresourceHasCacheControlNoCacheContainsPluginsDocumentLoadedOutstandingNetworkRequestOthersRequestedMIDIPermissionRequestedAudioCapturePermissionRequestedVideoCapturePermissionRequestedBackForwardCacheBlockedSensorsRequestedBackgroundWorkPermissionBroadcastChannelWebXRSharedWorkerSharedWorkerMessageSharedWorkerWithNoActiveClientWebLocksWebLocksContentionWebHIDWebBluetoothWebShareRequestedStorageAccessGrantWebNfcOutstandingNetworkRequestFetchOutstandingNetworkRequestXHRAppBannerPrintingWebDatabasePictureInPictureSpeechRecognizerIdleManagerPaymentManagerSpeechSynthesisKeyboardLockWebOTPServiceOutstandingNetworkRequestDirectSocketInjectedJavascriptInjectedStyleSheetKeepaliveRequestIndexedDBEventDummyJsNetworkRequestReceivedCacheControlNoStoreResourceWebRTCUsedWithCCNSWebTransportUsedWithCCNSWebSocketUsedWithCCNSSmartCardLiveMediaStreamTrackUnloadHandlerParserAbortedContentSecurityHandlerContentWebAuthenticationAPIContentFileChooserContentSerialContentFileSystemAccessContentMediaDevicesDispatcherHostContentWebBluetoothContentWebUSBContentMediaSessionServiceContentScreenReaderContentDiscardedEmbedderPopupBlockerTabHelperEmbedderSafeBrowsingTriggeredPopupBlockerEmbedderSafeBrowsingThreatDetailsEmbedderAppBannerManagerEmbedderDomDistillerViewerSourceEmbedderDomDistillerSelfDeletingRequestDelegateEmbedderOomInterventionTabHelperEmbedderOfflinePageEmbedderChromePasswordManagerClientBindCredentialManagerEmbedderPermissionRequestManagerEmbedderModalDialogEmbedderExtensionsEmbedderExtensionMessagingEmbedderExtensionMessagingForOpenPortEmbedderExtensionSentMessageToCachedFrameRequestedByWebViewClientPostMessageByWebViewClientCacheControlNoStoreDeviceBoundSessionTerminatedCacheLimitPrunedOnModerateMemoryPressureCacheLimitPrunedOnCriticalMemoryPressure

EN
List of not restored reasons for back-forward cache.
Allowed Values: NotPrimaryMainFrame, BackForwardCacheDisabled, RelatedActiveContentsExist, HTTPStatusNotOK, SchemeNotHTTPOrHTTPS, Loading, WasGrantedMediaAccess, DisableForRenderFrameHostCalled, DomainNotAllowed, HTTPMethodNotGET, SubframeIsNavigating, Timeout, CacheLimit, JavaScriptExecution, RendererProcessKilled, RendererProcessCrashed, SchedulerTrackedFeatureUsed, ConflictingBrowsingInstance, CacheFlushed, ServiceWorkerVersionActivation, SessionRestored, ServiceWorkerPostMessage, EnteredBackForwardCacheBeforeServiceWorkerHostAdded, RenderFrameHostReused_SameSite, RenderFrameHostReused_CrossSite, ServiceWorkerClaim, IgnoreEventAndEvict, HaveInnerContents, TimeoutPuttingInCache, BackForwardCacheDisabledByLowMemory, BackForwardCacheDisabledByCommandLine, NetworkRequestDatapipeDrainedAsBytesConsumer, NetworkRequestRedirected, NetworkRequestTimeout, NetworkExceedsBufferLimit, NavigationCancelledWhileRestoring, NotMostRecentNavigationEntry, BackForwardCacheDisabledForPrerender, UserAgentOverrideDiffers, ForegroundCacheLimit, ForwardCacheDisabled, BrowsingInstanceNotSwapped, BackForwardCacheDisabledForDelegate, UnloadHandlerExistsInMainFrame, UnloadHandlerExistsInSubFrame, ServiceWorkerUnregistration, CacheControlNoStore, CacheControlNoStoreCookieModified, CacheControlNoStoreHTTPOnlyCookieModified, NoResponseHead, Unknown, ActivationNavigationsDisallowedForBug1234857, ErrorDocument, FencedFramesEmbedder, CookieDisabled, HTTPAuthRequired, CookieFlushed, BroadcastChannelOnMessage, WebViewSettingsChanged, WebViewJavaScriptObjectChanged, WebViewMessageListenerInjected, WebViewSafeBrowsingAllowlistChanged, WebViewDocumentStartJavascriptChanged, WebSocket, WebTransport, WebRTC, MainResourceHasCacheControlNoStore, MainResourceHasCacheControlNoCache, SubresourceHasCacheControlNoStore, SubresourceHasCacheControlNoCache, ContainsPlugins, DocumentLoaded, OutstandingNetworkRequestOthers, RequestedMIDIPermission, RequestedAudioCapturePermission, RequestedVideoCapturePermission, RequestedBackForwardCacheBlockedSensors, RequestedBackgroundWorkPermission, BroadcastChannel, WebXR, SharedWorker, SharedWorkerMessage, SharedWorkerWithNoActiveClient, WebLocks, WebLocksContention, WebHID, WebBluetooth, WebShare, RequestedStorageAccessGrant, WebNfc, OutstandingNetworkRequestFetch, OutstandingNetworkRequestXHR, AppBanner, Printing, WebDatabase, PictureInPicture, SpeechRecognizer, IdleManager, PaymentManager, SpeechSynthesis, KeyboardLock, WebOTPService, OutstandingNetworkRequestDirectSocket, InjectedJavascript, InjectedStyleSheet, KeepaliveRequest, IndexedDBEvent, Dummy, JsNetworkRequestReceivedCacheControlNoStoreResource, WebRTCUsedWithCCNS, WebTransportUsedWithCCNS, WebSocketUsedWithCCNS, SmartCard, LiveMediaStreamTrack, UnloadHandler, ParserAborted, ContentSecurityHandler, ContentWebAuthenticationAPI, ContentFileChooser, ContentSerial, ContentFileSystemAccess, ContentMediaDevicesDispatcherHost, ContentWebBluetooth, ContentWebUSB, ContentMediaSessionService, ContentScreenReader, ContentDiscarded, EmbedderPopupBlockerTabHelper, EmbedderSafeBrowsingTriggeredPopupBlocker, EmbedderSafeBrowsingThreatDetails, EmbedderAppBannerManager, EmbedderDomDistillerViewerSource, EmbedderDomDistillerSelfDeletingRequestDelegate, EmbedderOomInterventionTabHelper, EmbedderOfflinePage, EmbedderChromePasswordManagerClientBindCredentialManager, EmbedderPermissionRequestManager, EmbedderModalDialog, EmbedderExtensions, EmbedderExtensionMessaging, EmbedderExtensionMessagingForOpenPort, EmbedderExtensionSentMessageToCachedFrame, RequestedByWebViewClient, PostMessageByWebViewClient, CacheControlNoStoreDeviceBoundSessionTerminated, CacheLimitPrunedOnModerateMemoryPressure, CacheLimitPrunedOnCriticalMemoryPressure

返回类型:string


📌Page.BackForwardCacheNotRestoredReasonType🧪

前后缓存未恢复原因的类型。
允许的值:SupportPendingPageSupportNeededCircumstantial

EN
Types of not restored reasons for back-forward cache.
Allowed Values: SupportPending, PageSupportNeeded, Circumstantial

返回类型:string


📌Page.ClientNavigationDisposition🧪

允许的值:currentTabnewTabnewWindowdownload

EN
Allowed Values: currentTab, newTab, newWindow, download

返回类型:string


📌Page.ClientNavigationReason🧪

允许的值:anchorClickformSubmissionGetformSubmissionPosthttpHeaderRefreshinitialFrameNavigationmetaTagRefreshotherpageBlockInterstitialreloadscriptInitiated

EN
Allowed Values: anchorClick, formSubmissionGet, formSubmissionPost, httpHeaderRefresh, initialFrameNavigation, metaTagRefresh, other, pageBlockInterstitial, reload, scriptInitiated

返回类型:string


📌Page.CompilationCacheParams🧪

Page.produceCompilationCache 的每脚本编译缓存参数

EN
Per-script compilation cache parameters for Page.produceCompilationCache

返回类型:object

属性必填标记类型描述原文
url✔️string为生成编译缓存条目而准备的脚本的URL。
ENThe URL of the script to produce a compilation cache entry for.
eagerboolean是否推荐进行即时编译的提示(实际使用的编译模式由后端自行决定)。
ENA hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).

📌Page.CrossOriginIsolatedContextType🧪

指示该框架是否处于跨域隔离状态及其原因。
允许取值:IsolatedNotIsolatedNotIsolatedFeatureDisabled

EN
Indicates whether the frame is cross-origin isolated and why it is the case.
Allowed Values: Isolated, NotIsolated, NotIsolatedFeatureDisabled

返回类型:string


📌Page.FileFilter🧪

返回类型:object

属性必填标记类型描述原文
namestring
acceptsarray[string]

📌Page.FileHandler🧪

返回类型:object

属性必填标记类型描述原文
action✔️string
name✔️string
iconsarray[ImageResource]
acceptsarray[FileFilter]模仿一个映射,name是键,accepts是值。
ENMimic a map, name is the key, accepts is the value.
launchType✔️string不会重复枚举,使用字符串以便于比较。与下面的其他枚举相同。
ENWon't repeat the enums, using string for easy comparison. Same as the other enums below.

📌Page.FontFamilies🧪

通用字体系列集合。

EN
Generic font families collection.

返回类型:object

属性必填标记类型描述原文
standardstring标准字体族。
ENThe standard font-family.
fixedstring固定的字体族。
ENThe fixed font-family.
serifstringserif 字体族。
ENThe serif font-family.
sansSerifstring无衬线字体族。
ENThe sansSerif font-family.
cursivestring''cursive''字体族。
ENThe cursive font-family.
fantasystring幻想字体家族。
ENThe fantasy font-family.
mathstring数学字体族。
ENThe math font-family.

📌Page.FontSizes🧪

默认字体大小。

EN
Default font sizes.

返回类型:object

属性必填标记类型描述原文
standardinteger默认标准字体大小。
ENDefault standard font size.
fixedinteger默认固定字体大小。
ENDefault fixed font size.

📌Page.FrameResource🧪

关于页面资源的信息。

EN
Information about the Resource on the page.

返回类型:object

属性必填标记类型描述原文
url✔️string资源URL。
ENResource URL.
type✔️Network.ResourceType此资源的类型。
ENType of this resource.
mimeType✔️string由浏览器确定的资源MIME类型。
ENResource mimeType as determined by the browser.
lastModifiedNetwork.TimeSinceEpoch服务器报告的 last-modified 时间戳。
ENlast-modified timestamp as reported by server.
contentSizenumber资源内容大小。
ENResource content size.
failedboolean如果资源加载失败,则为真。
ENTrue if the resource failed to load.
canceledboolean如果资源在加载期间被取消,则为真。
ENTrue if the resource was canceled during loading.

📌Page.FrameResourceTree🧪

关于Frame层次结构及其缓存资源的信息。

EN
Information about the Frame hierarchy along with their cached resources.

返回类型:object

属性必填标记类型描述原文
frame✔️Frame此树状项目的帧信息。
ENFrame information for this tree item.
childFramesarray[FrameResourceTree]子框架。
ENChild frames.
resources✔️array[FrameResource]关于框架资源的信息。
ENInformation about frame resources.

📌Page.GatedAPIFeatures🧪

允许的值:SharedArrayBuffersSharedArrayBuffersTransferAllowedPerformanceMeasureMemoryPerformanceProfile

EN
Allowed Values: SharedArrayBuffers, SharedArrayBuffersTransferAllowed, PerformanceMeasureMemory, PerformanceProfile

返回类型:string


📌Page.ImageResource🧪

图标和截图中使用的图像定义。

EN
The image definition used in both icon and screenshot.

返回类型:object

属性必填标记类型描述原文
url✔️string定义中的 src 字段,但为了保持一致性更改为 url。
ENThe src field in the definition, but changing to url in favor of consistency.
sizesstring
typestring

📌Page.InstallabilityError🧪

安装性错误

EN
The installability error

返回类型:object

属性必填标记类型描述原文
errorId✔️string错误ID(例如'manifest-missing-suitable-icon')。
ENThe error id (e.g. 'manifest-missing-suitable-icon').
errorArguments✔️array[InstallabilityErrorArgument]错误参数列表(例如 {name:'minimum-icon-size-in-pixels', value:'64'})。
ENThe list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).

📌Page.InstallabilityErrorArgument🧪

返回类型:object

属性必填标记类型描述原文
name✔️string参数名称(例如 name:'minimum-icon-size-in-pixels')。
ENArgument name (e.g. name:'minimum-icon-size-in-pixels').
value✔️string参数值(例如 value:'64')。
ENArgument value (e.g. value:'64').

📌Page.LaunchHandler🧪

返回类型:object

属性必填标记类型描述原文
clientMode✔️string

帧导航事件类型。
允许的值:NavigationBackForwardCacheRestore

EN
The type of a frameNavigated event.
Allowed Values: Navigation, BackForwardCacheRestore

返回类型:string


📌Page.OriginTrial🧪

返回类型:object

属性必填标记类型描述原文
trialName✔️string
status✔️OriginTrialStatus
tokensWithStatus✔️array[OriginTrialTokenWithStatus]

📌Page.OriginTrialStatus🧪

源试验状态。
允许值:EnabledValidTokenNotProvidedOSNotSupportedTrialNotAllowed

EN
Status for an Origin Trial.
Allowed Values: Enabled, ValidTokenNotProvided, OSNotSupported, TrialNotAllowed

返回类型:string


📌Page.OriginTrialToken🧪

返回类型:object

属性必填标记类型描述原文
origin✔️string
matchSubDomains✔️boolean
trialName✔️string
expiryTime✔️Network.TimeSinceEpoch
isThirdParty✔️boolean
usageRestriction✔️OriginTrialUsageRestriction

📌Page.OriginTrialTokenStatus🧪

Origin Trial(https://www.chromium.org/blink/origin-trials)支持。Origin Trial 令牌的状态。
允许的值:SuccessNotSupportedInsecureExpiredWrongOriginInvalidSignatureMalformedWrongVersionFeatureDisabledTokenDisabledFeatureDisabledForUserUnknownTrial

EN
Origin Trial(https://www.chromium.org/blink/origin-trials) support. Status for an Origin Trial token.
Allowed Values: Success, NotSupported, Insecure, Expired, WrongOrigin, InvalidSignature, Malformed, WrongVersion, FeatureDisabled, TokenDisabled, FeatureDisabledForUser, UnknownTrial

返回类型:string


📌Page.OriginTrialTokenWithStatus🧪

返回类型:object

属性必填标记类型描述原文
rawTokenText✔️string
parsedTokenOriginTrialTokenparsedToken 仅在令牌可提取且可解析时出现。
ENparsedToken is present only when the token is extractable and parsable.
status✔️OriginTrialTokenStatus

📌Page.OriginTrialUsageRestriction🧪

允许的值:NoneSubset

EN
Allowed Values: None, Subset

返回类型:string


📌Page.PermissionsPolicyBlockLocator🧪

返回类型:object

属性必填标记类型描述原文
frameId✔️FrameId
blockReason✔️PermissionsPolicyBlockReason

📌Page.PermissionsPolicyBlockReason🧪

权限策略功能被禁用的原因。
允许的值:HeaderIframeAttributeInFencedFrameTreeInIsolatedApp

EN
Reason for a permissions policy feature to be disabled.
Allowed Values: Header, IframeAttribute, InFencedFrameTree, InIsolatedApp

返回类型:string


📌Page.PermissionsPolicyFeature🧪

所有权限策略功能。此枚举应与 services/network/public/cpp/permissions_policy/permissions_policy_features.json5 中定义的枚举保持一致。LINT.IfChange(PermissionsPolicyFeature)
允许的值:accelerometerall-screens-captureambient-light-sensoraria-notifyattribution-reportingautofillautoplaybluetoothbrowsing-topicscameracaptured-surface-controlch-dprch-device-memorych-downlinkch-ectch-prefers-color-schemech-prefers-reduced-motionch-prefers-reduced-transparencych-rttch-save-datach-uach-ua-archch-ua-bitnessch-ua-high-entropy-valuesch-ua-platformch-ua-modelch-ua-mobilech-ua-form-factorsch-ua-full-versionch-ua-full-version-listch-ua-platform-versionch-ua-wow64ch-viewport-heightch-viewport-widthch-widthclipboard-readclipboard-writecompute-pressurecontrolled-framecross-origin-isolateddeferred-fetchdeferred-fetch-minimaldevice-attributesdigital-credentials-createdigital-credentials-getdirect-socketsdirect-sockets-multicastdirect-sockets-privatedisplay-capturedocument-domainencrypted-mediaexecution-while-out-of-viewportexecution-while-not-renderedfenced-unpartitioned-storage-readfocus-without-user-activationfullscreenfrobulategamepadgeolocationgyroscopehididentity-credentials-getidle-detectioninterest-cohortjoin-ad-interest-groupkeyboard-maplanguage-detectorlanguage-modellocal-fontslocal-networklocal-network-accessloopback-networkmagnetometermanual-textmedia-playback-while-not-visiblemicrophonemidion-device-speech-recognitionotp-credentialspaymentpicture-in-pictureprivate-aggregationprivate-state-token-issuanceprivate-state-token-redemptionpublickey-credentials-createpublickey-credentials-getrecord-ad-auction-eventsrewriterrun-ad-auctionscreen-wake-lockserialshared-storageshared-storage-select-urlsmart-cardspeaker-selectionstorage-accesssub-appssummarizersync-xhrtranslatorunloadusbusb-unrestrictedvertical-scrollweb-app-installationweb-printingweb-sharewindow-managementwriterxr-spatial-tracking

EN
All Permissions Policy features. This enum should match the one defined in services/network/public/cpp/permissions_policy/permissions_policy_features.json5. LINT.IfChange(PermissionsPolicyFeature)
Allowed Values: accelerometer, all-screens-capture, ambient-light-sensor, aria-notify, attribution-reporting, autofill, autoplay, bluetooth, browsing-topics, camera, captured-surface-control, ch-dpr, ch-device-memory, ch-downlink, ch-ect, ch-prefers-color-scheme, ch-prefers-reduced-motion, ch-prefers-reduced-transparency, ch-rtt, ch-save-data, ch-ua, ch-ua-arch, ch-ua-bitness, ch-ua-high-entropy-values, ch-ua-platform, ch-ua-model, ch-ua-mobile, ch-ua-form-factors, ch-ua-full-version, ch-ua-full-version-list, ch-ua-platform-version, ch-ua-wow64, ch-viewport-height, ch-viewport-width, ch-width, clipboard-read, clipboard-write, compute-pressure, controlled-frame, cross-origin-isolated, deferred-fetch, deferred-fetch-minimal, device-attributes, digital-credentials-create, digital-credentials-get, direct-sockets, direct-sockets-multicast, direct-sockets-private, display-capture, document-domain, encrypted-media, execution-while-out-of-viewport, execution-while-not-rendered, fenced-unpartitioned-storage-read, focus-without-user-activation, fullscreen, frobulate, gamepad, geolocation, gyroscope, hid, identity-credentials-get, idle-detection, interest-cohort, join-ad-interest-group, keyboard-map, language-detector, language-model, local-fonts, local-network, local-network-access, loopback-network, magnetometer, manual-text, media-playback-while-not-visible, microphone, midi, on-device-speech-recognition, otp-credentials, payment, picture-in-picture, private-aggregation, private-state-token-issuance, private-state-token-redemption, publickey-credentials-create, publickey-credentials-get, record-ad-auction-events, rewriter, run-ad-auction, screen-wake-lock, serial, shared-storage, shared-storage-select-url, smart-card, speaker-selection, storage-access, sub-apps, summarizer, sync-xhr, translator, unload, usb, usb-unrestricted, vertical-scroll, web-app-installation, web-printing, web-share, window-management, writer, xr-spatial-tracking

返回类型:string


📌Page.PermissionsPolicyFeatureState🧪

返回类型:object

属性必填标记类型描述原文
feature✔️PermissionsPolicyFeature
allowed✔️boolean
locatorPermissionsPolicyBlockLocator

📌Page.ProtocolHandler🧪

返回类型:object

属性必填标记类型描述原文
protocol✔️string
url✔️string

📌Page.ReferrerPolicy🧪

用于导航的引用策略。
允许的值:noReferrernoReferrerWhenDowngradeoriginoriginWhenCrossOriginsameOriginstrictOriginstrictOriginWhenCrossOriginunsafeUrl

EN
The referring-policy used for the navigation.
Allowed Values: noReferrer, noReferrerWhenDowngrade, origin, originWhenCrossOrigin, sameOrigin, strictOrigin, strictOriginWhenCrossOrigin, unsafeUrl

返回类型:string


📌Page.RelatedApplication🧪

返回类型:object

属性必填标记类型描述原文
idstring
url✔️string

📌Page.ScopeExtension🧪

返回类型:object

属性必填标记类型描述原文
origin✔️string除了使用元组,此字段始终返回序列化字符串,以便于理解和比较。
ENInstead of using tuple, this field always returns the serialized string for easy understanding and comparison.
hasOriginWildcard✔️boolean

📌Page.ScreencastFrameMetadata🧪

Screencast frame metadata.

EN
Screencast frame metadata.

返回类型:object

属性必填标记类型描述原文
offsetTop✔️number顶部偏移量(以DIP为单位)。
ENTop offset in DIP.
pageScaleFactor✔️number页面缩放比例。
ENPage scale factor.
deviceWidth✔️number设备屏幕宽度(以DIP为单位)。
ENDevice screen width in DIP.
deviceHeight✔️number设备屏幕高度(以DIP为单位)。
ENDevice screen height in DIP.
scrollOffsetX✔️number水平滚动条在CSS像素中的位置。
ENPosition of horizontal scroll in CSS pixels.
scrollOffsetY✔️numberCSS像素中的垂直滚动位置。
ENPosition of vertical scroll in CSS pixels.
timestampNetwork.TimeSinceEpoch帧交换时间戳。
ENFrame swap timestamp.

📌Page.Screenshot🧪

返回类型:object

属性必填标记类型描述原文
image✔️ImageResource
formFactor✔️string
labelstring

📌Page.ScriptFontFamilies🧪

某个字体的字体系列集合。

EN
Font families collection for a script.

返回类型:object

属性必填标记类型描述原文
script✔️string这些字体族所定义的脚本的名称。
ENName of the script which these font families are defined for.
fontFamilies✔️FontFamilies脚本的通用字体系列集合。
ENGeneric font families collection for the script.

📌Page.SecureContextType🧪

指示该框架是否为安全上下文及其原因。
允许值:SecureSecureLocalhostInsecureSchemeInsecureAncestor

EN
Indicates whether the frame is a secure context and why it is the case.
Allowed Values: Secure, SecureLocalhost, InsecureScheme, InsecureAncestor

返回类型:string


📌Page.SecurityOriginDetails🧪

关于框架文档安全源的附加信息。

EN
Additional information about the frame document's security origin.

返回类型:object

属性必填标记类型描述原文
isLocalhost✔️boolean指示框架文档的安全源是否为本地主机名(例如"localhost")或IP地址(IPv4 127.0.0.0/8 或 IPv6 ::1)之一。
ENIndicates whether the frame document's security origin is one of the local hostnames (e.g. "localhost") or IP addresses (IPv4 127.0.0.0/8 or IPv6 ::1).

📌Page.ShareTarget🧪

返回类型:object

属性必填标记类型描述原文
action✔️string
method✔️string
enctype✔️string
titlestring嵌入ShareTargetParams
ENEmbed the ShareTargetParams
textstring
urlstring
filesarray[FileFilter]

📌Page.Shortcut🧪

返回类型:object

属性必填标记类型描述原文
name✔️string
url✔️string

📌Page.WebAppManifest🧪

返回类型:object

属性必填标记类型描述原文
backgroundColorstring
descriptionstring清单提供的额外描述。
ENThe extra description provided by the manifest.
dirstring
displaystring
displayOverridesarray[string]用户控制的覆盖显示模式。
ENThe overrided display mode controlled by the user.
fileHandlersarray[FileHandler]打开文件的处理程序。
ENThe handlers to open files.
iconsarray[ImageResource]
idstring
langstring
launchHandlerLaunchHandlerTODO(crbug.com/1231886): 此字段为非标准字段,属于Chrome实验性功能的一部分。参见:https://github.com/WICG/web-app-launch/blob/main/launch_handler.md
ENTODO(crbug.com/1231886): This field is non-standard and part of a Chrome experiment. See: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md
namestring
orientationstring
preferRelatedApplicationsboolean
protocolHandlersarray[ProtocolHandler]用于打开协议的处理程序。
ENThe handlers to open protocols.
relatedApplicationsarray[RelatedApplication]
scopestring
scopeExtensionsarray[ScopeExtension]非标准,详见 https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md
ENNon-standard, see https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md
screenshotsarray[Screenshot]chromium 使用的截图。
ENThe screenshots used by chromium.
shareTargetShareTarget
shortNamestring
shortcutsarray[Shortcut]
startUrlstring
themeColorstring