From 860bf6b2a67a2c28b849d4f7140de93daeda935e Mon Sep 17 00:00:00 2001 From: agneszitte Date: Tue, 9 Jul 2024 00:27:48 -0400 Subject: [PATCH] fix: Replace deprecated DOMNodeInserted with MutationObserver for Algolia DocSearch initialization - Removed deprecated DOMNodeInserted event listener - Implemented MutationObserver to monitor changes in the DOM - Added error handling for better debugging - Ensured observation starts only after DOM is fully loaded - Included comments for better code understanding and future updates --- .../uno/partials/scripts.tmpl.partial | 122 +++++++++++++++--- 1 file changed, 106 insertions(+), 16 deletions(-) diff --git a/doc/templates/uno/partials/scripts.tmpl.partial b/doc/templates/uno/partials/scripts.tmpl.partial index b7f6f98babf0..1732f89b5510 100644 --- a/doc/templates/uno/partials/scripts.tmpl.partial +++ b/doc/templates/uno/partials/scripts.tmpl.partial @@ -16,30 +16,120 @@ startOnLoad: false }); mermaid.init(undefined, ".lang-mermaid"); + +