@fluffjs/fluff 0.1.8 → 0.1.9
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 +1 -1
- package/runtime/FluffBase.js +3 -0
- package/runtime/FluffElementImpl.js +0 -3
- package/runtime/tests/TestDirectChildComponent.d.ts +6 -0
- package/runtime/tests/TestDirectChildComponent.js +10 -0
- package/runtime/tests/TestDirectParentComponent.d.ts +6 -0
- package/runtime/tests/TestDirectParentComponent.js +10 -0
package/package.json
CHANGED
package/runtime/FluffBase.js
CHANGED
|
@@ -158,6 +158,9 @@ export class FluffBase extends HTMLElement {
|
|
|
158
158
|
if (el instanceof FluffBase) {
|
|
159
159
|
update();
|
|
160
160
|
}
|
|
161
|
+
else {
|
|
162
|
+
console.warn(`Element <${tagName}> is not a FluffBase instance after whenDefined - binding for "${binding.n}" skipped`);
|
|
163
|
+
}
|
|
161
164
|
});
|
|
162
165
|
}
|
|
163
166
|
}
|
|
@@ -269,9 +269,6 @@ export class FluffElement extends FluffBase {
|
|
|
269
269
|
if (closestComponent && closestComponent !== el)
|
|
270
270
|
continue;
|
|
271
271
|
if (el instanceof HTMLElement) {
|
|
272
|
-
const tagName = el.tagName.toLowerCase();
|
|
273
|
-
if (customElements.get(tagName))
|
|
274
|
-
continue;
|
|
275
272
|
this.__processBindingsOnElement(el, scope);
|
|
276
273
|
}
|
|
277
274
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FluffElement } from '../FluffElement.js';
|
|
2
|
+
export class TestDirectChildComponent extends FluffElement {
|
|
3
|
+
value = '';
|
|
4
|
+
__render() {
|
|
5
|
+
this.__getShadowRoot().innerHTML = `<span class="value">${this.value}</span>`;
|
|
6
|
+
}
|
|
7
|
+
__setupBindings() {
|
|
8
|
+
super.__setupBindings();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FluffElement } from '../FluffElement.js';
|
|
2
|
+
export class TestDirectParentComponent extends FluffElement {
|
|
3
|
+
itemName = 'test-item';
|
|
4
|
+
__render() {
|
|
5
|
+
this.__getShadowRoot().innerHTML = '<test-direct-child data-lid="l0" x-fluff-component></test-direct-child>';
|
|
6
|
+
}
|
|
7
|
+
__setupBindings() {
|
|
8
|
+
super.__setupBindings();
|
|
9
|
+
}
|
|
10
|
+
}
|