+ static function initHTML5() {
+ $doc = new ExtendedDocument();
+ $doc->loadHTML('<!DOCTYPE html><html></html>'); // this seems to be the only way to get the DOCTYPE set properly.
+
+ // Created basic HTML document structure.
+ $root = $doc->getElementsByTagName('html')->item(0);
+ $head = $root->appendElement('head');
+ $title = $head->appendElement('title');
+ $body = $root->appendElement('body');
+
+ return array('document' => $doc,
+ 'html' => $root,
+ 'head' => $head,
+ 'title' => $title,
+ 'body' => $body);
+ }
+