The TreeWalker.filter read-only property returns the NodeFilter associated with the TreeWalker.
TreeWalker.filter
NodeFilter
MDN Reference