reuse a little more code in Mojo::DOM