@radishland/runtime 0.5.0 → 0.6.0

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.
Files changed (2) hide show
  1. package/client/index.js +9 -7
  2. package/package.json +1 -1
package/client/index.js CHANGED
@@ -248,7 +248,7 @@ var HandlerRegistry = class extends HTMLElement {
248
248
  }
249
249
  }
250
250
  }
251
- #handleText(e) {
251
+ #handleTextContent(e) {
252
252
  if (e instanceof DirectiveEvent) {
253
253
  const { identifier, target } = e.detail;
254
254
  if (identifier in this && target instanceof HTMLElement) {
@@ -256,7 +256,7 @@ var HandlerRegistry = class extends HTMLElement {
256
256
  this.effect(() => {
257
257
  target.textContent = `${ref}`;
258
258
  });
259
- target.removeAttribute("text");
259
+ target.removeAttribute("textContent");
260
260
  e.stopPropagation();
261
261
  }
262
262
  }
@@ -373,10 +373,10 @@ var HandlerRegistry = class extends HTMLElement {
373
373
  });
374
374
  element.dispatchEvent(propRequest);
375
375
  }
376
- const text = element.getAttribute("text");
377
- if (text) {
378
- const textRequest = new DirectiveEvent("rad::text", {
379
- identifier: text,
376
+ const textContent = element.getAttribute("textContent");
377
+ if (textContent) {
378
+ const textRequest = new DirectiveEvent("rad::textContent", {
379
+ identifier: textContent,
380
380
  key: "textContent",
381
381
  target: element
382
382
  });
@@ -420,7 +420,9 @@ var HandlerRegistry = class extends HTMLElement {
420
420
  this.addEventListener("rad::html", this.#handleHTML, { signal: signal2 });
421
421
  this.addEventListener("rad::on", this.#handleOn, { signal: signal2 });
422
422
  this.addEventListener("rad::prop", this.#handleProp, { signal: signal2 });
423
- this.addEventListener("rad::text", this.#handleText, { signal: signal2 });
423
+ this.addEventListener("rad::textContent", this.#handleTextContent, {
424
+ signal: signal2
425
+ });
424
426
  this.addEventListener("rad::use", this.#handleUse, { signal: signal2 });
425
427
  }
426
428
  disconnectedCallback() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radishland/runtime",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "The Radish runtime",
6
6
  "author": "Frédéric Crozatier",