-rw-r--r-- | content/util.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/content/util.js b/content/util.js index c4af09e..ccc61cf 100644 --- a/content/util.js +++ b/content/util.js @@ -60,2 +60,9 @@ function xp_node(xp,x) { } +/* + * extract xpath-specified ordered set of nodes + */ +function xp_nodes(xp,x) { + return x.evaluate( + xp, x, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null); +} |