feat(test): more tests in Node.js

This commit is contained in:
Marc Laval
2015-03-17 13:51:20 +01:00
committed by vsavkin
parent 99f2d7faf6
commit 46b03a524e
2 changed files with 16 additions and 1 deletions

View File

@ -366,10 +366,17 @@ export class Parse5DomAdapter extends DomAdapter {
defaultDoc() {
if (defDoc === null) {
defDoc = StringMapWrapper.create();
defDoc.title = "Default title";
StringMapWrapper.set(defDoc, "head", treeAdapter.createElement("head", null, []));
}
return defDoc;
}
getTitle() {
return this.defaultDoc().title || "";
}
setTitle(newTitle:string) {
this.defaultDoc().title = newTitle;
}
isTemplateElement(el:any):boolean {
return this.isElementNode(el) && this.tagName(el) === "template";
}