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

Function hook

test/test-suite.js:1295–1300  ·  view source on GitHub ↗
(node, data, config)

Source from the content-addressed store, hash-verified

1293 (assert) => {
1294 let seenConfig = null;
1295 const hook = (node, data, config) => {
1296 seenConfig = config;
1297 if (data.tagName === 'widen-me') {
1298 data.allowedTags.extra = true;
1299 }
1300 };
1301
1302 DOMPurify.addHook('uponSanitizeElement', hook);
1303 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected