Overlay🧪
此域提供了与在被检查页面上方绘图相关的各种功能。
EN
✅️️ Methods
🔨Overlay.disable
禁用域通知。
EN
🔨Overlay.enable
启用域通知。
EN
🔨Overlay.getGridHighlightObjectsForTest
用于持久化网格测试。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| nodeIds | ✔️ | array[DOM.NodeId] | 获取高亮对象的节点ID。 | ENIds of the node to get highlight object for. |
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| highlights | object | 为提供的节点ID提供网格高亮数据。 | ENGrid Highlight data for the node ids provided. |
🔨Overlay.getHighlightObjectForTest
用于测试。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| nodeId | ✔️ | DOM.NodeId | 获取高亮对象的节点标识符。 | ENId of the node to get highlight object for. | |
| includeDistance | boolean | 是否包含距离信息。 | ENWhether to include distance info. | ||
| includeStyle | boolean | 是否包含样式信息。 | ENWhether to include style info. | ||
| colorFormat | ColorFormat | 获取配置的颜色格式(默认:hex)。 | ENThe color format to get config with (default: hex). | ||
| showAccessibilityInfo | boolean | 是否显示无障碍信息(默认值:true)。 | ENWhether to show accessibility info (default: true). |
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| highlight | object | 高亮节点的数据。 | ENHighlight data for the node. |
🔨Overlay.getSourceOrderHighlightObjectForTest
用于源顺序查看器测试。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| nodeId | ✔️ | DOM.NodeId | 要突出显示的节点的ID。 | ENId of the node to highlight. |
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| highlight | object | 为提供的节点ID提供源顺序高亮数据。 | ENSource order highlight data for the node id provided. |
🔨Overlay.hideHighlight
隐藏任何高亮。
EN
🔨Overlay.highlightNode
高亮显示具有给定 id 或给定 JavaScript 对象包装器的 DOM 节点。必须指定 nodeId 或 objectId 其中之一。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| highlightConfig | ✔️ | HighlightConfig | 一个描述高亮外观的描述符。 | ENA descriptor for the highlight appearance. | |
| nodeId | DOM.NodeId | 要突出显示的节点的标识符。 | ENIdentifier of the node to highlight. | ||
| backendNodeId | DOM.BackendNodeId | 要突出显示的后端节点标识符。 | ENIdentifier of the backend node to highlight. | ||
| objectId | Runtime.RemoteObjectId | 要突出显示的节点的JavaScript对象标识符。 | ENJavaScript object id of the node to be highlighted. | ||
| selector | string | 突出显示相关节点的选择器。 | ENSelectors to highlight relevant nodes. |
🔨Overlay.highlightQuad
高亮显示给定的四边形。坐标是相对于主框架视口的绝对坐标。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| quad | ✔️ | DOM.Quad | Quad 高亮显示 | ENQuad to highlight | |
| color | DOM.RGBA | 高亮填充颜色(默认:transparent)。 | ENThe highlight fill color (default: transparent). | ||
| outlineColor | DOM.RGBA | 高亮轮廓线的颜色(默认:transparent)。 | ENThe highlight outline color (default: transparent). |
🔨Overlay.highlightRect
高亮指定矩形。坐标是相对于主框架视口的绝对坐标。问题:该方法未正确处理设备像素比(DPR)。如果DPR不为1,当前必须由客户端调整坐标(参见 crbug.com/437807128)。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| x | ✔️ | integer | X坐标 | ENX coordinate | |
| y | ✔️ | integer | Y 坐标 | ENY coordinate | |
| width | ✔️ | integer | 矩形宽度 | ENRectangle width | |
| height | ✔️ | integer | 矩形高度 | ENRectangle height | |
| color | DOM.RGBA | 高亮填充颜色(默认值:transparent)。 | ENThe highlight fill color (default: transparent). | ||
| outlineColor | DOM.RGBA | 高亮轮廓颜色(默认:transparent)。 | ENThe highlight outline color (default: transparent). |
🔨Overlay.highlightSourceOrder
高亮显示具有给定id或给定JavaScript对象包装器的DOM节点的子元素的源顺序。必须指定nodeId或objectId之一。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| sourceOrderConfig | ✔️ | SourceOrderConfig | 覆盖层绘制外观的描述符。 | ENA descriptor for the appearance of the overlay drawing. | |
| nodeId | DOM.NodeId | 要突出显示的节点的标识符。 | ENIdentifier of the node to highlight. | ||
| backendNodeId | DOM.BackendNodeId | 高亮显示 的后端节点标识符。 | ENIdentifier of the backend node to highlight. | ||
| objectId | Runtime.RemoteObjectId | 要突出显示的节点的JavaScript对象标识符。 | ENJavaScript object id of the node to be highlighted. |
🔨Overlay.setInspectMode
进入 'inspect' 模式。在此模式下,用户悬停的元素会被高亮显示。选择元素后,后端会生成 inspectNodeRequested 事件。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| mode | ✔️ | InspectMode | 设置检查模式。 | ENSet an inspection mode. | |
| highlightConfig | HighlightConfig | 用于描述悬停节点高亮外观的描述符。如果 enabled == false,则可以省略。 | ENA descriptor for the highlight appearance of hovered-over nodes. May be omitted ifenabled == false. |
🔨Overlay.setPausedInDebuggerMessage
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| message | string | 要显示的消息,同时触发恢复和单步跳过控制。 | ENThe message to display, also triggers resume and step over controls. |
🔨Overlay.setShowAdHighlights
高亮所有被检测为广告的框架的所有者元素。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| show | ✔️ | boolean | True for showing ad highlights | ENTrue for showing ad highlights |
🔨Overlay.setShowContainerQueryOverlays
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| containerQueryHighlightConfigs | ✔️ | array[ContainerQueryHighlightConfig] | 一个节点标识符和突出显示外观描述符的数组。 | ENAn array of node identifiers and descriptors for the highlight appearance. |
🔨Overlay.setShowDebugBorders
请求后端在图层上显示调试边框
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| show | ✔️ | boolean | True for showing debug borders | ENTrue for showing debug borders |
🔨Overlay.setShowFlexOverlays
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| flexNodeHighlightConfigs | ✔️ | array[FlexNodeHighlightConfig] | 一个节点标识符和突出显示外观描述符的数组。 | ENAn array of node identifiers and descriptors for the highlight appearance. |
🔨Overlay.setShowFPSCounter
请求后端显示FPS计数器
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| show | ✔️ | boolean | True for showing the FPS counter | ENTrue for showing the FPS counter |
🔨Overlay.setShowGridOverlays
使用CSS网格覆盖高亮多个元素。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| gridNodeHighlightConfigs | ✔️ | array[GridNodeHighlightConfig] | 一个节点标识符和突出显示外观描述符的数组。 | ENAn array of node identifiers and descriptors for the highlight appearance. |
🔨Overlay.setShowHinge
添加一个双屏幕设备铰链
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| hingeConfig | HingeConfig | hinge data,null 表示 hideHinge | ENhinge data, null means hideHinge |
🔨Overlay.setShowInspectedElementAnchor
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| inspectedElementAnchorConfig | ✔️ | InspectedElementAnchorConfig | 显示锚点的节点标识符。 | ENNode identifier for which to show an anchor for. |
🔨Overlay.setShowIsolatedElements
在隔离模式下显示元素,并带有覆盖层。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| isolatedElementHighlightConfigs | ✔️ | array[IsolatedElementHighlightConfig] | 节点标识符和突出显示外观描述符的数组。 | ENAn array of node identifiers and descriptors for the highlight appearance. |
🔨Overlay.setShowLayoutShiftRegions
请求后端显示布局偏移区域
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| result | ✔️ | boolean | True for showing layout shift regions | ENTrue for showing layout shift regions |
🔨Overlay.setShowPaintRects
请求后端显示绘制矩形
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| result | ✔️ | boolean | True for showing paint rectangles | ENTrue for showing paint rectangles |
🔨Overlay.setShowScrollBottleneckRects
请求后端显示滚动瓶颈矩形
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| show | ✔️ | boolean | True for showing scroll bottleneck rects | ENTrue for showing scroll bottleneck rects |
🔨Overlay.setShowScrollSnapOverlays
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| scrollSnapHighlightConfigs | ✔️ | array[ScrollSnapHighlightConfig] | 一个节点标识符数组及其高亮外观的描述符。 | ENAn array of node identifiers and descriptors for the highlight appearance. |
🔨Overlay.setShowViewportSizeOnResize
在主框架调整大小时绘制视口尺寸。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| show | ✔️ | boolean | 是否绘制尺寸。 | ENWhether to paint size or not. |
🔨Overlay.setShowWindowControlsOverlay
显示PWA的窗口控件覆盖层
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| windowControlsOverlayConfig | WindowControlsOverlayConfig | Window Controls Overlay数据,null表示隐藏Window Controls Overlay | ENWindow Controls Overlay data, null means hide Window Controls Overlay |
🔨Overlay.highlightFrame❌️
高亮显示具有给定ID的框架的所有者元素。已弃用:由于进程分离(所有者节点可能位于不同进程中),此功能无法可靠工作且无法修复。请在客户端中确定所有者节点并使用highlightNode。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| frameId | ✔️ | Page.FrameId | 要突出显示的框架标识符。 | ENIdentifier of the frame to highlight. | |
| contentColor | DOM.RGBA | 内容框高亮填充颜色(默认:transparent)。 | ENThe content box highlight fill color (default: transparent). | ||
| contentOutlineColor | DOM.RGBA | 内容框高亮轮廓颜色(默认:透明)。 | ENThe content box highlight outline color (default: transparent). |
🔨Overlay.setShowHitTestBorders❌️
已弃用,不再产生任何效果。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| show | ✔️ | boolean | True for showing hit-test borders | ENTrue for showing hit-test borders |
🔨Overlay.setShowWebVitals❌️
已弃用,不再产生任何效果。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| show | ✔️ | boolean |
✅️️ Events
👋Overlay.inspectedElementWindowRestored
当用户要求恢复“检查元素”浮动窗口时触发。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| backendNodeId | ✔️ | DOM.BackendNodeId | 恢复浮动窗口的节点ID。 | ENId of the node to restore the floating window for. |
👋Overlay.inspectModeCanceled
当用户取消检查模式时触发。
EN
👋Overlay.inspectNodeRequested
当节点需要被检查时触发。这发生在调用 setInspectMode 方法后,或者用户手动检查元素时。
EN
setInspectMode or when user manually inspects an element.| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| backendNodeId | ✔️ | DOM.BackendNodeId | 要检查的节点的Id。 | ENId of the node to inspect. |
👋Overlay.inspectPanelShowRequested
当用户请求显示检查面板时触发。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| backendNodeId | ✔️ | DOM.BackendNodeId | 要在面板中显示的节点标识符。 | ENId of the node to show in the panel. |
👋Overlay.nodeHighlightRequested
当节点需要高亮显示时触发。此事件在调用 setInspectMode 后发生。
EN
setInspectMode.| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| nodeId | ✔️ | DOM.NodeId |
👋Overlay.screenshotRequested
当用户请求捕获页面某个区域的屏幕截图时触发。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| viewport | ✔️ | Page.Viewport | 要捕获的视口,以设备独立像素(dip)为单位。 | ENViewport to capture, in device independent pixels (dip). |
✅️️ Types
📌Overlay.BoxStyle
绘制盒子的样式信息。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| fillColor | DOM.RGBA | 方框的背景色(默认:transparent) | ENThe background color for the box (default: transparent) | ||
| hatchColor | DOM.RGBA | 方框的填充颜色(默认值:透明) | ENThe hatching color for the box (default: transparent) |
📌Overlay.ColorFormat
允许的值:rgb、hsl、hwb、hex
EN
rgb, hsl, hwb, hex返回类型:string
📌Overlay.ContainerQueryContainerHighlightConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| containerBorder | LineStyle | 容器边框的样式。 | ENThe style of the container border. | ||
| descendantBorder | LineStyle | 后代元素的边框样式。 | ENThe style of the descendants' borders. |
📌Overlay.ContainerQueryHighlightConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| containerQueryContainerHighlightConfig | ✔️ | ContainerQueryContainerHighlightConfig | 容器查询容器高亮外观的描述符。 | ENA descriptor for the highlight appearance of container query containers. | |
| nodeId | ✔️ | DOM.NodeId | 高亮显示的容器节点的标识符。 | ENIdentifier of the container node to highlight. |
📌Overlay.ContrastAlgorithm
允许的值:aa、aaa、apca
EN
aa, aaa, apca返回类型:string
📌Overlay.FlexContainerHighlightConfig
用于突出显示Flex容器元素的配置数据。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| containerBorder | LineStyle | 容器边框的样式 | ENThe style of the container border | ||
| lineSeparator | LineStyle | 行间分隔符的样式 | ENThe style of the separator between lines | ||
| itemSeparator | LineStyle | 项目之间的分隔符样式 | ENThe style of the separator between items | ||
| mainDistributedSpace | BoxStyle | 主轴上内容分布空间的对齐方式(justify-content)。 | ENStyle of content-distribution space on the main axis (justify-content). | ||
| crossDistributedSpace | BoxStyle | 内容在交叉轴上的分布空间样式(align-content)。 | ENStyle of content-distribution space on the cross axis (align-content). | ||
| rowGapSpace | BoxStyle | 由行间距(gap/row-gap)引起的空白区域样式。 | ENStyle of empty space caused by row gaps (gap/row-gap). | ||
| columnGapSpace | BoxStyle | 列间隙(gap/column-gap)导致的空白区域的样式。 | ENStyle of empty space caused by columns gaps (gap/column-gap). | ||
| crossAlignment | LineStyle | 自对齐线的样式(align-items)。 | ENStyle of the self-alignment line (align-items). |
📌Overlay.FlexItemHighlightConfig
用于高亮显示 Flex 项目元素的配置数据。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| baseSizeBox | BoxStyle | 表示项目基准尺寸的框的样式 | ENStyle of the box representing the item's base size | ||
| baseSizeBorder | LineStyle | 表示项目基础尺寸的盒子边框样式 | ENStyle of the border around the box representing the item's base size | ||
| flexibilityArrow | LineStyle | 表示项目增长或收缩的箭头样式 | ENStyle of the arrow representing if the item grew or shrank |
📌Overlay.FlexNodeHighlightConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| flexContainerHighlightConfig | ✔️ | FlexContainerHighlightConfig | Flex容器高亮外观的描述符。 | ENA descriptor for the highlight appearance of flex containers. | |
| nodeId | ✔️ | DOM.NodeId | 要高亮的节点的标识符。 | ENIdentifier of the node to highlight. |
📌Overlay.GridHighlightConfig
用于高亮显示网格元素的配置数据。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| showGridExtensionLines | boolean | 是否显示从网格单元格到标尺的延伸线(默认值:false)。 | ENWhether the extension lines from grid cells to the rulers should be shown (default: false). | ||
| showPositiveLineNumbers | boolean | 显示正数行号标签(默认值:false)。 | ENShow Positive line number labels (default: false). | ||
| showNegativeLineNumbers | boolean | 显示负行号标签(默认值:false)。 | ENShow Negative line number labels (default: false). | ||
| showAreaNames | boolean | 显示区域名称标签(默认值:false)。 | ENShow area name labels (default: false). | ||
| showLineNames | boolean | 显示行名标签(默认值:false)。 | ENShow line name labels (default: false). | ||
| showTrackSizes | boolean | 显示轨道尺寸标签(默认值:false)。 | ENShow track size labels (default: false). | ||
| gridBorderColor | DOM.RGBA | 网格容器边框高亮颜色(默认:transparent)。 | ENThe grid container border highlight color (default: transparent). | ||
| cellBorderColor | ❌️ | DOM.RGBA | 单元格边框颜色(默认:透明)。已弃用,请改用 rowLineColor 和 columnLineColor。 | ENThe cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead. | |
| rowLineColor | DOM.RGBA | 行线颜色(默认:transparent)。 | ENThe row line color (default: transparent). | ||
| columnLineColor | DOM.RGBA | 列线颜色(默认:transparent)。 | ENThe column line color (default: transparent). | ||
| gridBorderDash | boolean | 网格边框是否为虚线(默认值:false)。 | ENWhether the grid border is dashed (default: false). | ||
| cellBorderDash | ❌️ | boolean | 单元格边框是否为虚线(默认值:false)。已弃用,请改用 rowLineDash 和 columnLineDash。 | ENWhether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead. | |
| rowLineDash | boolean | 行线是否为虚线(默认值:false)。 | ENWhether row lines are dashed (default: false). | ||
| columnLineDash | boolean | 列线是否为虚线(默认值:false)。 | ENWhether column lines are dashed (default: false). | ||
| rowGapColor | DOM.RGBA | 行间距高亮填充颜色(默认:transparent)。 | ENThe row gap highlight fill color (default: transparent). | ||
| rowHatchColor | DOM.RGBA | 行间距填充颜色(默认:transparent)。 | ENThe row gap hatching fill color (default: transparent). | ||
| columnGapColor | DOM.RGBA | 列间距高亮填充颜色(默认:''transparent'')。 | ENThe column gap highlight fill color (default: transparent). | ||
| columnHatchColor | DOM.RGBA | 列间隙填充的阴影颜色(默认:transparent)。 | ENThe column gap hatching fill color (default: transparent). | ||
| areaBorderColor | DOM.RGBA | 命名网格区域的边框颜色(默认值:transparent)。 | ENThe named grid areas border color (Default: transparent). | ||
| gridBackgroundColor | DOM.RGBA | 网格容器背景色(默认:transparent)。 | ENThe grid container background color (Default: transparent). |
📌Overlay.GridNodeHighlightConfig
持久网格高亮配置
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| gridHighlightConfig | ✔️ | GridHighlightConfig | 一个用于描述高亮外观的描述符。 | ENA descriptor for the highlight appearance. | |
| nodeId | ✔️ | DOM.NodeId | 要突出显示的节点的标识符。 | ENIdentifier of the node to highlight. |
📌Overlay.HighlightConfig
页面元素高亮的配置数据。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| showInfo | boolean | 是否应显示节点信息工具提示(默认值:false)。 | ENWhether the node info tooltip should be shown (default: false). | ||
| showStyles | boolean | 工具提示中是否显示节点样式(默认值:false)。 | ENWhether the node styles in the tooltip (default: false). | ||
| showRulers | boolean | 是否显示标尺(默认值:false)。 | ENWhether the rulers should be shown (default: false). | ||
| showAccessibilityInfo | boolean | 是否应显示a11y信息(默认值:true)。 | ENWhether the a11y info should be shown (default: true). | ||
| showExtensionLines | boolean | 是否应显示从节点到标尺的延伸线(默认值:false)。 | ENWhether the extension lines from node to the rulers should be shown (default: false). | ||
| contentColor | DOM.RGBA | 内容框高亮填充颜色(默认:transparent)。 | ENThe content box highlight fill color (default: transparent). | ||
| paddingColor | DOM.RGBA | 内边距高亮填充颜色(默认:transparent)。 | ENThe padding highlight fill color (default: transparent). | ||
| borderColor | DOM.RGBA | 边框高亮填充颜色(默认:transparent)。 | ENThe border highlight fill color (default: transparent). | ||
| marginColor | DOM.RGBA | 边距高亮填充颜色(默认值:transparent)。 | ENThe margin highlight fill color (default: transparent). | ||
| eventTargetColor | DOM.RGBA | 事件目标元素高亮填充颜色(默认:transparent)。 | ENThe event target element highlight fill color (default: transparent). | ||
| shapeColor | DOM.RGBA | 形状外部填充颜色(默认:transparent)。 | ENThe shape outside fill color (default: transparent). | ||
| shapeMarginColor | DOM.RGBA | 形状边距填充颜色(默认:transparent)。 | ENThe shape margin fill color (default: transparent). | ||
| cssGridColor | DOM.RGBA | 网格布局颜色(默认:transparent)。 | ENThe grid layout color (default: transparent). | ||
| colorFormat | ColorFormat | 用于格式化颜色样式的颜色格式(默认值:hex)。 | ENThe color format used to format color styles (default: hex). | ||
| gridHighlightConfig | GridHighlightConfig | 网格布局高亮配置(默认:全部透明)。 | ENThe grid layout highlight configuration (default: all transparent). | ||
| flexContainerHighlightConfig | FlexContainerHighlightConfig | flex容器高亮配置(默认:全部透明)。 | ENThe flex container highlight configuration (default: all transparent). | ||
| flexItemHighlightConfig | FlexItemHighlightConfig | flex item 高亮配置(默认:全部透明)。 | ENThe flex item highlight configuration (default: all transparent). | ||
| contrastAlgorithm | ContrastAlgorithm | 要使用的对比度算法(用于对比比率的计算)(默认值:aa)。 | ENThe contrast algorithm to use for the contrast ratio (default: aa). | ||
| containerQueryContainerHighlightConfig | ContainerQueryContainerHighlightConfig | 容器查询容器高亮配置(默认值:全部透明)。 | ENThe container query container highlight configuration (default: all transparent). |
📌Overlay.HingeConfig
双屏铰链配置
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| rect | ✔️ | DOM.Rect | 一个矩形代表铰链 | ENA rectangle represent hinge | |
| contentColor | DOM.RGBA | 内容框高亮填充颜色(默认:深色)。 | ENThe content box highlight fill color (default: a dark color). | ||
| outlineColor | DOM.RGBA | 内容框高亮轮廓颜色(默认:transparent)。 | ENThe content box highlight outline color (default: transparent). |
📌Overlay.InspectedElementAnchorConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| nodeId | DOM.NodeId | 要突出显示的节点的标识符。 | ENIdentifier of the node to highlight. | ||
| backendNodeId | DOM.BackendNodeId | 要突出显示的后端节点标识符。 | ENIdentifier of the backend node to highlight. |
📌Overlay.InspectMode
允许的值:searchForNode、searchForUAShadowDOM、captureAreaScreenshot、none
EN
searchForNode, searchForUAShadowDOM, captureAreaScreenshot, none返回类型:string
📌Overlay.IsolatedElementHighlightConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| isolationModeHighlightConfig | ✔️ | IsolationModeHighlightConfig | 一个描述元素在隔离模式下高亮外观的描述符。 | ENA descriptor for the highlight appearance of an element in isolation mode. | |
| nodeId | ✔️ | DOM.NodeId | 要突出显示的隔离元素的标识符。 | ENIdentifier of the isolated element to highlight. |
📌Overlay.IsolationModeHighlightConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| resizerColor | DOM.RGBA | 调整器(resizers)的填充颜色(默认:透明)。 | ENThe fill color of the resizers (default: transparent). | ||
| resizerHandleColor | DOM.RGBA | 调整大小手柄的填充颜色(默认值:transparent)。 | ENThe fill color for resizer handles (default: transparent). | ||
| maskColor | DOM.RGBA | 用于覆盖非隔离元素的遮罩填充颜色(默认值:transparent)。 | ENThe fill color for the mask covering non-isolated elements (default: transparent). |
📌Overlay.LineStyle
绘制线条的样式信息。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| color | DOM.RGBA | 线条的颜色(默认:transparent) | ENThe color of the line (default: transparent) | ||
| pattern | string | 线条样式(默认:实线) 允许取值: dashed、dotted | ENThe line pattern (default: solid)Allowed Values: dashed, dotted |
📌Overlay.ScrollSnapContainerHighlightConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| snapportBorder | LineStyle | snapport 边框的样式(默认值:transparent) | ENThe style of the snapport border (default: transparent) | ||
| snapAreaBorder | LineStyle | snap area 边框的样式(默认:transparent) | ENThe style of the snap area border (default: transparent) | ||
| scrollMarginColor | DOM.RGBA | 边距高亮填充颜色(默认:transparent)。 | ENThe margin highlight fill color (default: transparent). | ||
| scrollPaddingColor | DOM.RGBA | 内边距高亮的填充颜色(默认值:transparent)。 | ENThe padding highlight fill color (default: transparent). |
📌Overlay.ScrollSnapHighlightConfig
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| scrollSnapContainerHighlightConfig | ✔️ | ScrollSnapContainerHighlightConfig | 滚动捕捉容器高亮外观的描述符。 | ENA descriptor for the highlight appearance of scroll snap containers. | |
| nodeId | ✔️ | DOM.NodeId | 要突出显示的节点的标识符。 | ENIdentifier of the node to highlight. |
📌Overlay.SourceOrderConfig
用于绘制元素子项源顺序的配置数据。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| parentOutlineColor | ✔️ | DOM.RGBA | 用于勾勒给定元素轮廓的颜色。 | ENthe color to outline the given element in. | |
| childOutlineColor | ✔️ | DOM.RGBA | 用于勾勒子元素轮廓的颜色。 | ENthe color to outline the child elements in. |
📌Overlay.WindowControlsOverlayConfig
窗口控件叠加层配置
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| showCSS | ✔️ | boolean | 当模拟窗口控件覆盖时,是否应显示标题栏CSS。 | ENWhether the title bar CSS should be shown when emulating the Window Controls Overlay. | |
| selectedPlatform | ✔️ | string | 选择用于显示覆盖层的平台。 | ENSelected platforms to show the overlay. | |
| themeColor | ✔️ | string | 应用清单中定义的主题颜色。 | ENThe theme color defined in app manifest. |