cotomy 0.2.1 → 0.2.2

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/README.md CHANGED
@@ -92,7 +92,7 @@ The View layer provides thin wrappers around DOM elements and window events.
92
92
  - `innerRect()` — Subtracts padding
93
93
  - Events
94
94
  - Generic: `on(event, handler, options?)`, `off(event, handler?, options?)`, `once(event, handler, options?)`, `trigger(event[, Event])`
95
- - Delegation: `onChild(event, selector, handler, options?)`
95
+ - Delegation: `onSubTree(event, selector, handler, options?)`
96
96
  - Mouse: `click`, `dblclick`, `mouseover`, `mouseout`, `mousedown`, `mouseup`, `mousemove`, `mouseenter`, `mouseleave`
97
97
  - Keyboard: `keydown`, `keyup`, `keypress`
98
98
  - Inputs: `change`, `input`
@@ -114,7 +114,7 @@ const panel = new CotomyElement({
114
114
  `,
115
115
  });
116
116
 
117
- panel.onChild("click", ".ok", () => console.log("clicked!"));
117
+ panel.onSubTree("click", ".ok", () => console.log("clicked!"));
118
118
  document.body.appendChild(panel.element);
119
119
  ```
120
120
 
@@ -1429,7 +1429,7 @@ class CotomyElement {
1429
1429
  EventRegistry.instance.on(event, this, entry);
1430
1430
  return this;
1431
1431
  }
1432
- onChild(event, selector, handle, options) {
1432
+ onSubTree(event, selector, handle, options) {
1433
1433
  const delegate = (e) => {
1434
1434
  const target = e.target;
1435
1435
  if (target && target.closest(selector)) {