handle_comment

[internal] handles comment when constructing DOM tree.

Arguments

Source


def handle_comment(self, data):
    if self._is_started:
        node = pyNode('comment')
        node.set_parent(self._dom[-1])
        self._dom[-1].add_child(node)
        node.add_comment(data)