@@ 2015-2021 (lines=7) @@ | ||
2012 | /* Create an element for the token and append the new element to the |
|
2013 | node pointed to by the head element pointer, or, if that is null |
|
2014 | (innerHTML case), to the current node. */ |
|
2015 | if ($this->head_pointer !== null) { |
|
2016 | $element = $this->insertElement($token, false); |
|
2017 | $this->head_pointer->appendChild($element); |
|
2018 | ||
2019 | } else { |
|
2020 | $element = $this->insertElement($token); |
|
2021 | } |
|
2022 | ||
2023 | /* Switch the tokeniser's content model flag to the RCDATA state. */ |
|
2024 | return HTML5::RCDATA; |
|
@@ 2031-2037 (lines=7) @@ | ||
2028 | /* Create an element for the token and append the new element to the |
|
2029 | node pointed to by the head element pointer, or, if that is null |
|
2030 | (innerHTML case), to the current node. */ |
|
2031 | if ($this->head_pointer !== null) { |
|
2032 | $element = $this->insertElement($token, false); |
|
2033 | $this->head_pointer->appendChild($element); |
|
2034 | ||
2035 | } else { |
|
2036 | $this->insertElement($token); |
|
2037 | } |
|
2038 | ||
2039 | /* Switch the tokeniser's content model flag to the CDATA state. */ |
|
2040 | return HTML5::CDATA; |
|
@@ 2060-2067 (lines=8) @@ | ||
2057 | /* Create an element for the token and append the new element to the |
|
2058 | node pointed to by the head element pointer, or, if that is null |
|
2059 | (innerHTML case), to the current node. */ |
|
2060 | if ($this->head_pointer !== null) { |
|
2061 | $element = $this->insertElement($token, false); |
|
2062 | $this->head_pointer->appendChild($element); |
|
2063 | array_pop($this->stack); |
|
2064 | ||
2065 | } else { |
|
2066 | $this->insertElement($token); |
|
2067 | } |
|
2068 | ||
2069 | /* An end tag with the tag name "head" */ |
|
2070 | } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'head') { |