Chrome | 112.0.0 | own | function | function shouldBlockChild(child, method, parentElement, old) {
// if (!('src' in child)) return;
if (!child.children) return;//is Element or Fragment
if (child.nodeName == "#document-fragment") {
// debugger;
}
let reason = getBlockedReason(child, child.src ?? child.dataset?.blockedSrc, method, {parentElement, old});
if (reason) {
if (/IFRAME/.test(child.tagName)) Object.defineProperty(child, 'contentWindow', {
get() {
return {
postMessage(...args){ (BLOCKED.postMessages ??= []).push(args)}
}
}
});
child.dataset.reason = reason;
// if (reason) {debugger}
return BLOCKED.dom.__appendChild(child);
}
} |