The Selection.containsNode() method indicates whether a specified node is part of the selection.
Selection.containsNode()
external bool containsNode(Node node, [bool allowPartialContainment]);