GeometryUtils

GeometryUtils interface provides different utility function to retrieve geometry information about DOM nodes.

GeometryUtils is a raw interface and no object of this type can be created; it is implemented by Text , Element , CSSPseudoElement ,和 Document 对象。

特性

This interface does not implement any properties.

方法

GeometryUtils.getBoxQuads()
Returns a list of DOMQuad objects representing the CSS fragments of the node.
GeometryUtils.convertQuadFromNode()
FIXME: Needs a description
GeometryUtils.convertRectFromNode()
FIXME: Needs a description
GeometryUtils.convertPointFromNode()
FIXME: Needs a description

规范

规范 状态 Comment
CSS Object Model (CSSOM) View Module
The definition of 'GeometryUtils' in that specification.
工作草案 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
GeometryUtils
Chrome ? Edge ? Firefox 部分支持 31 IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android 部分支持 31 Opera Android ? Safari iOS ? Samsung Internet Android ?
convertPointFromNode
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
convertQuadFromNode
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
convertRectFromNode
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
getBoxQuads
Chrome ? Edge ? Firefox 31
Disabled
31
Disabled
Disabled From version 31: this feature is behind the layout.css.getBoxQuads.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android 31
Disabled
31
Disabled
Disabled From version 31: this feature is behind the layout.css.getBoxQuads.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS ? Samsung Internet Android ?

图例

完整支持
完整支持
部分支持
部分支持
兼容性未知
兼容性未知
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
用户必须明确启用此特征。
用户必须明确启用此特征。