fix(HtmlParser): Do not add parent element for template children

fixes #5638
This commit is contained in:
Victor Berchet
2015-12-07 09:41:01 -08:00
parent 9850e68703
commit 3a438615c3
2 changed files with 18 additions and 2 deletions

View File

@ -141,6 +141,14 @@ export function main() {
]);
});
it('should not add the requiredParent when the parent is a template', () => {
expect(humanizeDom(parser.parse('<template><tr></tr></template>', 'TestComp')))
.toEqual([
[HtmlElementAst, 'template', 0],
[HtmlElementAst, 'tr', 1],
]);
});
it('should support explicit mamespace', () => {
expect(humanizeDom(parser.parse('<myns:div></myns:div>', 'TestComp')))
.toEqual([[HtmlElementAst, '@myns:div', 0]]);