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

Function _createNodeIterator

src/purify.ts:1763–1779  ·  view source on GitHub ↗
(
    root: Node,
    characterDataOnly = false
  )

Source from the content-addressed store, hash-verified

1761 * @return The created NodeIterator
1762 */
1763 const _createNodeIterator = function (
1764 root: Node,
1765 characterDataOnly = false
1766 ): NodeIterator {
1767 const doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;
1768 return createNodeIterator.call(
1769 doc || root,
1770 root,
1771 // eslint-disable-next-line no-bitwise
1772 (characterDataOnly ? 0 : NodeFilter.SHOW_ELEMENT) |
1773 NodeFilter.SHOW_COMMENT |
1774 NodeFilter.SHOW_TEXT |
1775 NodeFilter.SHOW_PROCESSING_INSTRUCTION |
1776 NodeFilter.SHOW_CDATA_SECTION,
1777 null
1778 );
1779 };
1780
1781 /**
1782 * Replace template expression syntax (mustache, ERB, template

Callers 4

_sanitizeUnvisitedInFunction · 0.85
_scrubOwnCharacterDataFunction · 0.85
_sanitizeShadowDOMFunction · 0.85
_sanitizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected