findDescendant

Type: Function

Deprecated!

Use XPath/XQuery to do this. Refer to the examples page for an example on how to do this.

Return the first (depth-first) descendant of node which matches the given spec.

Refer to domQuery for more information on how to import and use this function.

Arguments

  1. parentNode

    (Required)

    Type: Node

    The parent node under which to search

  2. spec

    (Required)

    Type: NodeSpec

    Node specification, as accepted by fontoxml-dom-utils' createNodeFilter.

Returns

Type: Node | NULL

The matching descendant of parentNode or null