traverses closing tags by default, added a root, and additional API methods: closing, opening, atOpening, atClosing.