This "thisNode" should be "element" instead. To avoid confusion can you rename it to "newNode"?