@@ 2021-2027 (lines=7) @@ | ||
2018 | /* Create an element for the token and append the new element to the |
|
2019 | node pointed to by the head element pointer, or, if that is null |
|
2020 | (innerHTML case), to the current node. */ |
|
2021 | if ($this->head_pointer !== null) { |
|
2022 | $element = $this->insertElement($token, false); |
|
2023 | $this->head_pointer->appendChild($element); |
|
2024 | ||
2025 | } else { |
|
2026 | $element = $this->insertElement($token); |
|
2027 | } |
|
2028 | ||
2029 | /* Switch the tokeniser's content model flag to the RCDATA state. */ |
|
2030 | return HTML5::RCDATA; |
|
@@ 2037-2043 (lines=7) @@ | ||
2034 | /* Create an element for the token and append the new element to the |
|
2035 | node pointed to by the head element pointer, or, if that is null |
|
2036 | (innerHTML case), to the current node. */ |
|
2037 | if ($this->head_pointer !== null) { |
|
2038 | $element = $this->insertElement($token, false); |
|
2039 | $this->head_pointer->appendChild($element); |
|
2040 | ||
2041 | } else { |
|
2042 | $this->insertElement($token); |
|
2043 | } |
|
2044 | ||
2045 | /* Switch the tokeniser's content model flag to the CDATA state. */ |
|
2046 | return HTML5::CDATA; |
|
@@ 2066-2073 (lines=8) @@ | ||
2063 | /* Create an element for the token and append the new element to the |
|
2064 | node pointed to by the head element pointer, or, if that is null |
|
2065 | (innerHTML case), to the current node. */ |
|
2066 | if ($this->head_pointer !== null) { |
|
2067 | $element = $this->insertElement($token, false); |
|
2068 | $this->head_pointer->appendChild($element); |
|
2069 | array_pop($this->stack); |
|
2070 | ||
2071 | } else { |
|
2072 | $this->insertElement($token); |
|
2073 | } |
|
2074 | ||
2075 | /* An end tag with the tag name "head" */ |
|
2076 | } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'head') { |