()
| 1635 | 'a DOM-built void element with children is removed in every mode', |
| 1636 | (assert) => { |
| 1637 | const build = () => { |
| 1638 | const root = document.createElement('div'); |
| 1639 | const img = document.createElement('img'); |
| 1640 | img.setAttribute('src', 'x'); |
| 1641 | img.appendChild(document.createTextNode('hidden')); |
| 1642 | root.appendChild(img); |
| 1643 | root.appendChild(document.createElement('i')); |
| 1644 | return root; |
| 1645 | }; |
| 1646 | |
| 1647 | assert.strictEqual( |
| 1648 | DOMPurify.sanitize(build()), |