| Tests how fragment works. |
| |
| f1.outerHTML: |
| <div-a attr="val" class=""><div-b foo1="bar1" s-state1-attr="val-state1" class="" foo2="bar2"></div-b><div-c class="my-class-1 my-class-2" foo="bar">Some text here And more text</div-c> |
| <div></div></div-a> |
| () => diva === f1.element() |
| true |
| () => diva.tagName === 'DIV-A' |
| true |
| () => divb.tagName === 'DIV-B' |
| true |
| () => divc.tagName === 'DIV-C' |
| true |
| () => divc.parentNode === diva |
| true |
| () => divb.parentNode === diva |
| true |
| () => diva.lastChild === inner |
| true |
| () => divb.getAttribute('foo1') === 'bar1' |
| true |
| () => divb.getAttribute('foo2') === 'bar2' |
| true |
| () => divb.divb === true |
| true |
| () => divc.textContent === 'Some text here And more text' |
| true |
| () => divc.classList.contains('my-class-1') |
| true |
| () => divc.classList.contains('my-class-2') |
| true |
| () => divc.getAttribute('foo') === 'bar' |
| true |
| () => diva.getAttribute('attr') === 'val' |
| true |
| () => divb.getAttribute('attr') === null |
| true |
| |
| f2.outerHTML: |
| <div><div-a attr="val" class=""><div-b foo1="bar1" s-state1-attr="val-state1" class="" foo2="bar2"></div-b><div-c class="my-class-1 my-class-2" foo="bar">Some text here And more text</div-c> |
| <div></div></div-a></div> |
| () => f2.element().firstChild === f1.element() |
| true |
| |
| f3.outerHTML: |
| <div><div><div-a attr="val" class=""><div-b foo1="bar1" s-state1-attr="val-state1" class="" foo2="bar2"></div-b><div-c class="my-class-1 my-class-2" foo="bar">Some text here And more text</div-c> |
| <div></div></div-a></div></div> |
| () => f3.element().firstChild === f2.element() |
| true |
| |
| () => UI.html`<div>${[1, 2, 3].map(x => UI.html`<span>${x}</span>`)}</div>`.childNodes.length === 3 |
| true |
| () => UI.html`first ${UI.html`<b>bold</b>`} second`.textContent === 'first bold second' |
| true |
| () => UI.html`<a href='${url}'></a>`.href === url |
| true |
| |