these should all be `else if` statements, `node.nodeName` can only be one of them at a time.