dalila 1.5.6 → 1.5.7

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.
@@ -177,14 +177,15 @@ function bindEvents(root, ctx, events, cleanups) {
177
177
  * Bind all [d-when] directives within root
178
178
  */
179
179
  function bindWhen(root, ctx, cleanups) {
180
- const elements = qsaIncludingRoot(root, '[d-when]');
180
+ const elements = qsaIncludingRoot(root, '[when], [d-when]');
181
181
  for (const el of elements) {
182
- const bindingName = normalizeBinding(el.getAttribute('d-when'));
182
+ const attrName = el.hasAttribute('when') ? 'when' : 'd-when';
183
+ const bindingName = normalizeBinding(el.getAttribute(attrName));
183
184
  if (!bindingName)
184
185
  continue;
185
186
  const binding = ctx[bindingName];
186
187
  if (binding === undefined) {
187
- warn(`d-when: "${bindingName}" not found in context`);
188
+ warn(`when: "${bindingName}" not found in context`);
188
189
  continue;
189
190
  }
190
191
  const htmlEl = el;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dalila",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "DOM-first reactive framework based on signals",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",