contains method

bool contains(
  1. NPage page
)

Implementation

bool contains(NPage page) {
  if (this == page) return true;
  for (var child in pages) {
    if (child.contains(page)) return true;
  }
  return false;
}