else { // Otherwise, it's a standard element.
$this->current->
appendChild($ele);
if (!Elements::
isA($name, Elements::VOID_TAG
)) { $this->current =
$ele;
} // Self-closing tags should only be respected on foreign elements
// (and are implied on void elements)
// See: https://www.w3.org/TR/html5/syntax.html#start-tags
if (Elements::
isHtml5Element($name)) { $selfClosing = false;
} } // This is sort of a last-ditch attempt to correct for cases where no head/body
// elements are provided.
if ($this->insertMode <=
static::IM_BEFORE_HEAD && 'head' !==
$name && 'html' !==
$name) { $this->insertMode =
static::IM_IN_BODY;
} // When we are on a void tag, we do not need to care about namesapce nesting,