Skip to content

Commit 74d549f

Browse files
committed
debug flyout cloning
1 parent 2911e72 commit 74d549f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,15 @@ function initRTDObserver() {
490490
return;
491491
}
492492
if (mutation.addedNodes[0].data.search("Inserted RTD Footer") != -1) {
493+
console.log("XXX FOUND MUTATED NODE XXX");
493494
let flyout = mutation.addedNodes[0].cloneNode(true);
495+
console.log(flyout);
494496
// copy the flyout menu to whichever of the 2 target nodes didn't already get
495497
// written to by the RTD injection script.
496498
document.querySelectorAll('[data-rtd-target="rtd"]').forEach((node) => {
499+
console.log("XXX FOUND A TARGET NODE XXX");
497500
if (!node.hasChildNodes()) {
501+
console.log("XXX FOUND CHILDLESS NODE XXX");
498502
node.appendChild(flyout);
499503
flyout.onclick = toggleFlyout;
500504
// replicate the onclick function RTD uses: it can't be cloned by cloneNode()

0 commit comments

Comments
 (0)