Skip to content

Commit

Permalink
Add test for a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
iacore committed Jun 12, 2024
1 parent 16f8b80 commit 0747045
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/html/template-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@ const docWithTemplateAttribute = parseHTML(`<div template="anything"><p>not insi

assert(docWithTemplateAttribute.querySelector('*').tagName, 'P');
assert(docWithTemplateAttribute.querySelectorAll('*').length, 1);


let {document: document2} = parseHTML('<template><img id="el-14" class="has-svg" src="./favicon.svg" inline=""></template>');
let template2 = document2.documentElement;
assert(template2.innerHTML, '<img id="el-14" class="has-svg" src="./favicon.svg" inline="">');

template2.content.childNodes[0].replaceWith(document.createElement('br'))
assert(template2.innerHTML, '<br>', 'expected content');

0 comments on commit 0747045

Please sign in to comment.