Also, I'm a bit surprised by the use of `nodeName` here. What is this actually doing?