This implements #262. I don't select the functionality by number of arguments, because it should be possible to pass an id without passing classes. So instead, I select based on the argument type: a string is treated as an id, anything else as a node. (If it's not a node I expect bind_to_node to complain, but I didn't check if it does; anyway, if such a check is required, it should be in that function, not in new_element.)
This implements #262. I don't select the functionality by number of arguments, because it should be possible to pass an id without passing classes. So instead, I select based on the argument type: a string is treated as an id, anything else as a node. (If it's not a node I expect bind_to_node to complain, but I didn't check if it does; anyway, if such a check is required, it should be in that function, not in new_element.)