The TreeWalker.whatToShow read-only property returns a bitmask that indicates the types of nodes to show.
TreeWalker.whatToShow
MDN Reference