public function appendToBody($element)
    {
        // Check if the element is valid
        if (empty($element)) {
            throw new InvalidArgumentException('The element provided is empty.');
        }

        // Append element to body
        $this->getBody()->append($element);

        return $this;
    }