reinitializer.handle(false);
This commit is contained in:
parent
c788e7939d
commit
fed3fd9539
|
@ -7,13 +7,15 @@ Used when developing any dynamic requests via JS where links to third-party docu
|
||||||
# Instruction
|
# Instruction
|
||||||
By default, the library is observe the first `<main>` element, but you can reassign it by passing an argument of type `{HTMLElement|null}` to `new e.detail.reinitializer();`
|
By default, the library is observe the first `<main>` 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) {
|
document.addEventListener('reinitializer.initialized', function (e) {
|
||||||
// Initialized reinitializer
|
// Initialized reinitializer
|
||||||
|
|
||||||
// Initialize of instance of reinitializer
|
// Initialize of instance of reinitializer
|
||||||
const reinitializer = new e.detail.reinitializer();
|
const reinitializer = new e.detail.reinitializer();
|
||||||
|
|
||||||
|
// First reinitialization with prevented downloading
|
||||||
|
reinitializer.handle(false);
|
||||||
|
|
||||||
// Start observation
|
// Start observation
|
||||||
reinitializer.start();
|
reinitializer.start();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue