dom Query
Type: Object
How to get domQuery?
JavaScript
import domQuery from 'fontoxml-dom-utils/src/domQuery.js'
DomQuery provides convenience methods to traverse the XML DOM. These can be used, but XPaths are more powerful and usually more readable.
In contexts where a Blueprint is available, always use blueprintQuery instead of domQuery to ensure the correct state of the DOM is used. Whenever possible, use XPath instead of either of these to avoid this distinction.
Properties
compare Node Positions
Type: compareNodePositions
compare Offset Positions
Type: compareOffsetPositions
compare Positions
Type: comparePositions
contains
Type: contains
find All Ancestors
Type: findAllAncestors
find Child
Type: findChild
find Children
Type: findChildren
find Closest Ancestor
Type: findClosestAncestor
find Common Ancestor
Type: findCommonAncestor
find Descendant
Type: findDescendant
find Descendants
Type: findDescendants
find Next In Document Order
Type: findNextInDocumentOrder
find Next Siblings
Type: findNextSiblings
find Previous Siblings
Type: findPreviousSiblings
find Top Most Nodes
Type: findTopMostNodes
get Container Length
Type: getContainerLength
get Document Node
Type: getDocumentNode
get Text Content
Type: getTextContent
is In Document
Type: isInDocument