MCPcopy Create free account
hub / github.com/cure53/DOMPurify / build

Function build

test/test-suite.js:1637–1645  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()),

Callers 1

test-suite.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected