@skirbi/sugar 0.0.23 → 0.0.25
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/Changes +8 -0
- package/lib/htmlelement.mjs +7 -1
- package/lib/index.mjs +1 -1
- package/lib/with-connected-sugar.mjs +3 -0
- package/package.json +1 -1
package/Changes
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
Revision history for @skirbi/sugar
|
|
2
2
|
|
|
3
|
+
0.0.25 2026-05-29 08:52:30Z
|
|
4
|
+
|
|
5
|
+
* Add hooks for event-listeners in connected sugar
|
|
6
|
+
|
|
7
|
+
0.0.24 2026-05-29 05:27:25Z
|
|
8
|
+
|
|
9
|
+
* Fix inheritance bugs related to init() twice
|
|
10
|
+
|
|
3
11
|
0.0.23 2026-05-28 03:53:52Z
|
|
4
12
|
|
|
5
13
|
* Make htmlelementsugar-select easier to override/extend
|
package/lib/htmlelement.mjs
CHANGED
|
@@ -45,8 +45,14 @@ export class HTMLElementSugar extends HTMLElement {
|
|
|
45
45
|
* multiple times on the component is ok, but discouraged.
|
|
46
46
|
*/
|
|
47
47
|
static init() {
|
|
48
|
+
|
|
48
49
|
this.checkTag();
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
if (!Object.hasOwn(this, '_sugarInitialized')) {
|
|
52
|
+
this.checkAttributes();
|
|
53
|
+
this._sugarInitialized = true;
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
this.checkTemplate();
|
|
51
57
|
}
|
|
52
58
|
|
package/lib/index.mjs
CHANGED
|
@@ -9,6 +9,9 @@ export const withConnectedSugar = (Base) =>
|
|
|
9
9
|
connectedCallback() {
|
|
10
10
|
this._syncObservedAttributesToConfig();
|
|
11
11
|
this._armMorphObserver();
|
|
12
|
+
if (this.connectedCallbackSugarOnce) {
|
|
13
|
+
this.connectedCallbackSugarOnce();
|
|
14
|
+
}
|
|
12
15
|
|
|
13
16
|
if (this._shouldRenderOnConnect()) {
|
|
14
17
|
this.connectedCallbackSugar();
|
package/package.json
CHANGED