mount-observer 0.0.90 → 0.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MountObserver.js +4 -4
- package/MountObserver.ts +4 -4
- package/package.json +1 -1
package/MountObserver.js
CHANGED
|
@@ -503,12 +503,12 @@ export class MountObserver extends EventTarget {
|
|
|
503
503
|
//getting into a catch-22 scenario frequently, blocking the code for resuming.
|
|
504
504
|
//This was observed with per-each package, demo/ScopeScript.html, clicking refresh a few times
|
|
505
505
|
//one will see the inconsistent behavior if await is added below.
|
|
506
|
-
const
|
|
507
|
-
if (
|
|
506
|
+
const idGenerators = Array.from(within.querySelectorAll('[-id]'));
|
|
507
|
+
if (idGenerators[0]) {
|
|
508
508
|
const { genIds } = await import('./refid/genIds.js');
|
|
509
|
-
for (const el of
|
|
509
|
+
for (const el of idGenerators) {
|
|
510
510
|
genIds(el);
|
|
511
|
-
el.removeAttribute('
|
|
511
|
+
el.removeAttribute('-id');
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
bindish(within, within, { assigner: this.#mountInit.assigner });
|
package/MountObserver.ts
CHANGED
|
@@ -533,12 +533,12 @@ export class MountObserver extends EventTarget implements IMountObserver{
|
|
|
533
533
|
//getting into a catch-22 scenario frequently, blocking the code for resuming.
|
|
534
534
|
//This was observed with per-each package, demo/ScopeScript.html, clicking refresh a few times
|
|
535
535
|
//one will see the inconsistent behavior if await is added below.
|
|
536
|
-
const
|
|
537
|
-
if(
|
|
536
|
+
const idGenerators = Array.from((within as DocumentFragment).querySelectorAll('[-id]'))
|
|
537
|
+
if(idGenerators[0]){
|
|
538
538
|
const {genIds} = await import('./refid/genIds.js');
|
|
539
|
-
for(const el of
|
|
539
|
+
for(const el of idGenerators){
|
|
540
540
|
genIds(el);
|
|
541
|
-
el.removeAttribute('
|
|
541
|
+
el.removeAttribute('-id');
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
bindish(within as DocumentFragment, within, {assigner: this.#mountInit.assigner});
|