How come element.append(\'cat\') actually appends text to the element node object. Shouldn\'t it be trying to append a string at the end of an element node?
Expected: