How to get domQuery

import domQuery from 'fontoxml-dom-utils/src/domQuery.js'

Type: Object

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.


Name Type Description
compareNodePositions compareNodePositions
compareOffsetPositions compareOffsetPositions
comparePositions comparePositions
contains contains
findAllAncestors findAllAncestors
findChild findChild
findChildren findChildren
findClosestAncestor findClosestAncestor
findCommonAncestor findCommonAncestor
findDescendant findDescendant
findDescendants findDescendants
findNextInDocumentOrder findNextInDocumentOrder
findNextSiblings findNextSiblings
findPreviousSiblings findPreviousSiblings
findTopMostNodes findTopMostNodes
getContainerLength getContainerLength
getDocumentNode getDocumentNode
getTextContent getTextContent
isInDocument isInDocument
Was this page helpful?