@esportsplus/template 0.22.3 → 0.22.4
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.
Potentially problematic release.
This version of @esportsplus/template might be problematic. Click here for more details.
- package/build/slot/cleanup.js +9 -8
- package/package.json +1 -1
- package/src/slot/cleanup.ts +12 -8
package/build/slot/cleanup.js
CHANGED
|
@@ -31,18 +31,19 @@ const ondisconnect = (element, fn) => {
|
|
|
31
31
|
(element[CLEANUP] ??= []).push(fn);
|
|
32
32
|
};
|
|
33
33
|
const remove = (groups) => {
|
|
34
|
-
let group
|
|
34
|
+
let group;
|
|
35
35
|
while (group = groups.pop()) {
|
|
36
|
-
head = group.head;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
cleanup.add(node[CLEANUP]);
|
|
36
|
+
let head = group.head, next, tail = group.tail || head;
|
|
37
|
+
while (tail) {
|
|
38
|
+
if (CLEANUP in tail) {
|
|
39
|
+
cleanup.add(tail[CLEANUP]);
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
next = previousSibling.call(tail);
|
|
42
|
+
tail.remove();
|
|
43
|
+
if (head === tail) {
|
|
44
44
|
break;
|
|
45
45
|
}
|
|
46
|
+
tail = next;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
if (!scheduled && cleanup.length) {
|
package/package.json
CHANGED
package/src/slot/cleanup.ts
CHANGED
|
@@ -45,22 +45,26 @@ const ondisconnect = (element: Element, fn: VoidFunction) => {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const remove = (groups: SlotGroup[]) => {
|
|
48
|
-
let group
|
|
48
|
+
let group;
|
|
49
49
|
|
|
50
50
|
while (group = groups.pop()) {
|
|
51
|
-
head = group.head
|
|
52
|
-
|
|
51
|
+
let head = group.head,
|
|
52
|
+
next,
|
|
53
|
+
tail = group.tail || head;
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
if (CLEANUP in
|
|
56
|
-
cleanup.add(
|
|
55
|
+
while (tail) {
|
|
56
|
+
if (CLEANUP in tail) {
|
|
57
|
+
cleanup.add( tail[CLEANUP] as VoidFunction[] );
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
next = previousSibling.call(tail);
|
|
61
|
+
tail.remove();
|
|
60
62
|
|
|
61
|
-
if (head ===
|
|
63
|
+
if (head === tail) {
|
|
62
64
|
break;
|
|
63
65
|
}
|
|
66
|
+
|
|
67
|
+
tail = next;
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
|