DataTables debugger does not work on a shadow-root.
DataTables debugger does not work on a shadow-root.
Link to test case:
Difficult to provide as DataTables debugger does not work on a custom element, with a shadow-root. See below.
Debugger code (debug.datatables.net):
function outerHTML(node) {
// if IE, Chrome take the internal method otherwise build one
return node.outerHTML || (function (n) {
if (n === document) {
return "";
}
var div = document.createElement('div'), h;
div.appendChild(n.cloneNode(true)); <<<<<< This line fails
h = div.innerHTML;
div = null;
return h;
})(node);
}
Error messages shown:
Browser console shows:
Uncaught NotSupportedError: Failed to execute 'cloneNode' on 'Node': ShadowRoot nodes are not clonable.
Description of problem:
I'm unable to create a test case for my actual problem because the shown function in the debugger breaks on the call to cloneNode.
I tried to override the file in the browser, and edit the code to return a few lines earlier (at if (n === document) but that breaks later with a JSON parse error "alert" dialog.
Answers
Interesting - thanks for pointing that out. I'll take a look and see if I can do anything about it.
Allan