set:leading() returns the nodes in one node-set that come before the first node in the other node-set.
Syntax
set:leading(nodeSet1, nodeSet2)
Parameters
nodeSet1- : The node set to find nodes in that precede the first node in the second node set.
nodeSet2- : The node set to compare against.
Return value
A node-set containing the nodes from nodeSet1 whose values precede the first node in nodeSet2.
[!NOTE] If the first node in
nodeSet2isn't contained innodeSet1, an empty set is returned. IfnodeSet2is empty, then the result isnodeSet1.
Specifications
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
