@fluffjs/fluff 0.1.16 → 0.1.17
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/package.json
CHANGED
package/runtime/ForController.js
CHANGED
package/runtime/IfController.js
CHANGED
|
@@ -38,6 +38,7 @@ export class IfController extends MarkerController {
|
|
|
38
38
|
if (matchedIndex >= 0 && matchedIndex < this.templates.length) {
|
|
39
39
|
this.cloneAndInsertTemplate(this.templates[matchedIndex], this.loopContext, undefined, this.bindingsSubscriptions);
|
|
40
40
|
}
|
|
41
|
+
this.refreshParentBindings();
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
this.subscribeTo(allDeps, update);
|
|
@@ -37,6 +37,7 @@ export declare abstract class MarkerController {
|
|
|
37
37
|
protected createChildScope(locals: Record<string, unknown>): Scope;
|
|
38
38
|
protected clearContentBetweenMarkersWithCleanup(bindingsSubscriptions: Subscription[]): void;
|
|
39
39
|
protected insertBeforeEndMarker(node: Node): void;
|
|
40
|
+
protected refreshParentBindings(): void;
|
|
40
41
|
protected processBindingsOnElement(el: HTMLElement, scope: Scope): void;
|
|
41
42
|
protected processBindingsOnElementWithSubscriptions(el: HTMLElement, scope: Scope, subscriptions: Subscription[]): void;
|
|
42
43
|
private __getFluffElementHost;
|
|
@@ -227,6 +227,18 @@ export class MarkerController {
|
|
|
227
227
|
return;
|
|
228
228
|
parent.insertBefore(node, this.endMarker);
|
|
229
229
|
}
|
|
230
|
+
refreshParentBindings() {
|
|
231
|
+
const parent = this.startMarker.parentNode;
|
|
232
|
+
if (!(parent instanceof HTMLElement))
|
|
233
|
+
return;
|
|
234
|
+
if (!parent.hasAttribute('data-lid'))
|
|
235
|
+
return;
|
|
236
|
+
const fluffHost = this.__getFluffElementHost();
|
|
237
|
+
if (!fluffHost)
|
|
238
|
+
return;
|
|
239
|
+
const scope = this.getScope();
|
|
240
|
+
fluffHost.__processBindingsOnElementPublic(parent, scope);
|
|
241
|
+
}
|
|
230
242
|
processBindingsOnElement(el, scope) {
|
|
231
243
|
const fluffHost = this.__getFluffElementHost();
|
|
232
244
|
if (!fluffHost)
|