From fed3fd9539e5163a2d059c670f5ab29eda6df174 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Fri, 6 Oct 2023 19:27:47 +0700 Subject: [PATCH] reinitializer.handle(false); --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d4ff819..14011c8 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,17 @@ Used when developing any dynamic requests via JS where links to third-party docu # Instruction By default, the library is observe the first `
` element, but you can reassign it by passing an argument of type `{HTMLElement|null}` to `new e.detail.reinitializer();` + document.addEventListener('reinitializer.initialized', function (e) { + // Initialized reinitializer - document.addEventListener('reinitializer.initialized', function (e) { - // Initialized reinitializer + // Initialize of instance of reinitializer + const reinitializer = new e.detail.reinitializer(); + + // First reinitialization with prevented downloading + reinitializer.handle(false); - // Initialize of instance of reinitializer - const reinitializer = new e.detail.reinitializer(); - - // Start observation - reinitializer.start(); - }); + // Start observation + reinitializer.start(); + }); By default, after reinitialization, `` elements are moved to the end of the `` element, and `