diff options
author | Technosophos <[email protected]> | 2013-04-24 16:34:12 -0500 |
---|---|---|
committer | Technosophos <[email protected]> | 2013-04-24 16:34:12 -0500 |
commit | b34490f3a1173ae2700b050868eb0301af49a22a (patch) | |
tree | 1b1afd941d58ab4b69394406e4d5799ab190137f /src/HTML5/Parser | |
parent | debc724a1e4048a9ec42c44c31e61542cbd52701 (diff) |
Unit tests for DOMTreeBuilder begun.
Minor bugs fixed, too.
Diffstat (limited to 'src/HTML5/Parser')
-rw-r--r-- | src/HTML5/Parser/DOMTreeBuilder.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/HTML5/Parser/DOMTreeBuilder.php b/src/HTML5/Parser/DOMTreeBuilder.php index be9fa23..2807790 100644 --- a/src/HTML5/Parser/DOMTreeBuilder.php +++ b/src/HTML5/Parser/DOMTreeBuilder.php @@ -30,7 +30,14 @@ class DOMTreeBuilder implements EventHandler { $this->doc = \DOMImplementation::createDocument(NULL, 'html', $dt); $this->doc->errors = array(); - $this->current = $this->doc->documentElement(); + $this->current = $this->doc->documentElement; + } + + /** + * Get the document. + */ + public function document() { + return $this->doc; } /** @@ -71,7 +78,7 @@ class DOMTreeBuilder implements EventHandler { public function endTag($name) { $lname = $this->normalizeTagName($name); - if ($this->current->tagName() != $lname) { + if ($this->current->tagName != $lname) { return $this->quirksTreeResolver($lname); } |